SIMLIB/C++
3.07
|
class CalendarList — list implementation of calendar More...
Public Member Functions | |
virtual void | ScheduleAt (Entity *p, double t) override |
enqueue More... | |
virtual Entity * | Get (Entity *p) override |
dequeue More... | |
virtual Entity * | GetFirst () override |
dequeue first entity More... | |
virtual void | clear (bool destroy=false) override |
remove all More... | |
virtual const char * | Name () override |
virtual void | debug_print () override |
for debugging only More... | |
![]() | |
bool | Empty () const |
unsigned | Size () const |
double | MinTime () const |
time of activation of first item More... | |
Static Public Member Functions | |
static CalendarList * | create () |
create calendar instance More... | |
![]() | |
static Calendar * | instance () |
create/get single instance (singleton) More... | |
static bool | instance_exists () |
check if the instance exists More... | |
Private Member Functions | |
CalendarList () | |
~CalendarList () | |
Private Attributes | |
CalendarListImplementation | l |
Additional Inherited Members | |
![]() | |
void | SetMinTime (double t) |
set cache for faster access More... | |
Calendar () | |
virtual | ~Calendar () |
clear is called in derived class dtr More... | |
![]() | |
static void | delete_instance () |
destroy single instance More... | |
![]() | |
unsigned | _size |
number of scheduled items More... | |
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.
|
inlineprivate |
Definition at line 393 of file calendar.cc.
References simlib3::Calendar::clear(), simlib3::Calendar::debug_print(), and Dprintf.
|
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, Dprintf, simlib3::Calendar::SetMinTime(), and simlib3::SIMLIB_MAXTIME.
|
inlinestatic |
create calendar instance
Definition at line 379 of file calendar.cc.
References simlib3::Calendar::delete_instance(), Dprintf, and simlib3::SIMLIB_atexit().
Referenced by simlib3::Calendar::instance(), and simlib3::SetCalendar().
|
overridevirtual |
for debugging only
Implements simlib3::Calendar.
Definition at line 1149 of file calendar.cc.
References simlib3::Calendar::instance_exists(), 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(), simlib3::EmptyCalendar, simlib3::EntityIsNotScheduled, simlib3::Entity::Idle(), 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(), simlib3::EmptyCalendar, 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::Calendar::MinTime(), simlib3::SchedulingBeforeTime, simlib3::Calendar::SetMinTime(), simlib3::SIMLIB_error(), and simlib3::Time.
|
private |
Definition at line 365 of file calendar.cc.