|
SIMLIB/C++ 3.09
|
class CalendarList — list implementation of calendar More...


Public Member Functions | |
| virtual void | ScheduleAt (Entity *p, double t) override |
| enqueue | |
| virtual Entity * | Get (Entity *p) override |
| dequeue | |
| virtual Entity * | GetFirst () override |
| dequeue first entity | |
| virtual void | clear (bool destroy=false) override |
| remove all | |
| virtual const char * | Name () override |
| virtual void | debug_print () override |
| for debugging only | |
Public Member Functions inherited from simlib3::Calendar | |
| bool | Empty () const |
| unsigned | Size () const |
| virtual void | ScheduleAt (Entity *e, double t)=0 |
| enqueue | |
| virtual Entity * | GetFirst ()=0 |
| dequeue first | |
| virtual Entity * | Get (Entity *e)=0 |
| dequeue | |
| virtual void | clear (bool destroy_entities=false)=0 |
| remove all scheduled entities | |
| virtual const char * | Name ()=0 |
| virtual void | debug_print ()=0 |
| for debugging only | |
| double | MinTime () const |
| time of activation of first item | |
Static Public Member Functions | |
| static CalendarList * | create () |
| create calendar instance | |
Static Public Member Functions inherited from simlib3::Calendar | |
| static Calendar * | instance () |
| create/get single instance (singleton) | |
| static bool | instance_exists () |
| check if the instance exists | |
Private Member Functions | |
| CalendarList () | |
| ~CalendarList () | |
Private Attributes | |
| CalendarListImplementation | l |
Additional Inherited Members | |
Protected Member Functions inherited from simlib3::Calendar | |
| void | SetMinTime (double t) |
| set cache for faster access | |
| Calendar () | |
| virtual | ~Calendar () |
| clear is called in derived class dtr | |
Static Protected Member Functions inherited from simlib3::Calendar | |
| static void | delete_instance () |
| destroy single instance | |
Protected Attributes inherited from simlib3::Calendar | |
| unsigned | _size |
| number of scheduled items | |
class CalendarList — list implementation of calendar
Definition at line 364 of file calendar.cc.
|
inlineprivate |
Definition at line 389 of file calendar.cc.
References Dprintf, simlib3::Calendar::SetMinTime(), and simlib3::SIMLIB_MAXTIME.
Referenced by create().
|
inlineprivate |
Definition at line 393 of file calendar.cc.
|
overridevirtual |
remove all
remove all event notices, and optionally destroy them
Implements simlib3::Calendar.
Definition at line 499 of file calendar.cc.
References simlib3::Calendar::_size, simlib3::CalendarListImplementation::clear(), Dprintf, l, simlib3::Calendar::SetMinTime(), and simlib3::SIMLIB_MAXTIME.
Referenced by ~CalendarList().
|
inlinestatic |
create calendar instance
Definition at line 379 of file calendar.cc.
References CalendarList(), simlib3::Calendar::delete_instance(), Dprintf, and simlib3::SIMLIB_atexit().
Referenced by simlib3::Calendar::instance().
|
overridevirtual |
for debugging only
Implements simlib3::Calendar.
Definition at line 1149 of file calendar.cc.
References simlib3::CalendarListImplementation::debug_print(), simlib3::Calendar::instance_exists(), l, and simlib3::Print().
dequeue
remove entity e from calendar
Implements simlib3::Calendar.
Definition at line 475 of file calendar.cc.
References simlib3::Calendar::_size, simlib3::Calendar::Empty(), EmptyCalendar, EntityIsNotScheduled, simlib3::CalendarListImplementation::first_time(), simlib3::Entity::Idle(), l, simlib3::CalendarListImplementation::remove(), simlib3::Calendar::SetMinTime(), simlib3::SIMLIB_error(), and simlib3::SIMLIB_MAXTIME.
|
overridevirtual |
dequeue first entity
delete first entity
Implements simlib3::Calendar.
Definition at line 456 of file calendar.cc.
References simlib3::Calendar::_size, simlib3::Calendar::Empty(), EmptyCalendar, simlib3::CalendarListImplementation::first_time(), l, simlib3::CalendarListImplementation::remove_first(), simlib3::Calendar::SetMinTime(), simlib3::SIMLIB_error(), and simlib3::SIMLIB_MAXTIME.
|
inlineoverridevirtual |
Implements simlib3::Calendar.
Definition at line 386 of file calendar.cc.
|
overridevirtual |
enqueue
schedule entity e at time t
Implements simlib3::Calendar.
Definition at line 442 of file calendar.cc.
References simlib3::Calendar::_size, simlib3::CalendarListImplementation::first_time(), simlib3::CalendarListImplementation::insert(), l, simlib3::Calendar::MinTime(), SchedulingBeforeTime, simlib3::Calendar::SetMinTime(), simlib3::SIMLIB_error(), t, and simlib3::Time.
|
private |
Definition at line 365 of file calendar.cc.
Referenced by clear(), debug_print(), Get(), GetFirst(), and ScheduleAt().