|
SIMLIB/C++ 3.09
|
class CalendarListImplementation — sorted list More...

Classes | |
| class | iterator |
Public Member Functions | |
| iterator | begin () |
| iterator | end () |
| bool | empty () |
| double | first_time () |
| EventNotice * | first () |
| void | insert (Entity *e, double t) |
| enqueue operation | |
| Entity * | remove (Entity *e) |
| special dequeue operation for rescheduling | |
| Entity * | remove_first () |
| dequeue operation | |
| CalendarListImplementation () | |
| void | clear (bool destroy) |
| remove all items | |
| ~CalendarListImplementation () | |
| void | debug_print () |
| print of calendar contents - FOR DEBUGGING ONLY | |
| EventNotice * | extract_first () |
| fast special operations for list swap (Dangerous!): | |
| void | insert_extracted (EventNotice *evn) |
| fast special enqueue operation | |
Private Member Functions | |
| iterator | search (EventNotice *en) |
| search — linear search for insert position | |
Private Attributes | |
| EventNoticeLinkBase | l |
| head of circular list | |
class CalendarListImplementation — sorted list
Definition at line 264 of file calendar.cc.
|
inline |
Definition at line 330 of file calendar.cc.
|
inline |
Definition at line 339 of file calendar.cc.
References simlib3::allocator, simlib3::EventNoticeAllocator::clear(), and clear().
|
inline |
Definition at line 282 of file calendar.cc.
References l, and simlib3::EventNoticeLinkBase::succ.
Referenced by debug_print(), empty(), simlib3::CalendarQueue::estimate_bucket_width(), first(), first_time(), simlib3::CalendarQueue::switchtocq(), and simlib3::CalendarQueue::visualize().
|
inline |
remove all items
| destroy | deallocates entities if true |
Definition at line 333 of file calendar.cc.
References empty(), simlib3::SimObject::isAllocated(), and remove_first().
Referenced by simlib3::CalendarList::clear(), simlib3::CalendarQueue::clear(), and ~CalendarListImplementation().
| void simlib3::CalendarListImplementation::debug_print | ( | ) |
print of calendar contents - FOR DEBUGGING ONLY
Definition at line 1136 of file calendar.cc.
References begin(), end(), and simlib3::Print().
Referenced by simlib3::CalendarList::debug_print(), and simlib3::CalendarQueue::debug_print().
|
inline |
Definition at line 284 of file calendar.cc.
References begin(), and end().
Referenced by clear(), simlib3::CalendarQueue::Resize(), search(), simlib3::CalendarQueue::SearchMinTime(), simlib3::CalendarQueue::switchtocq(), and simlib3::CalendarQueue::switchtolist().
|
inline |
Definition at line 283 of file calendar.cc.
References l.
Referenced by debug_print(), empty(), simlib3::CalendarQueue::estimate_bucket_width(), search(), simlib3::CalendarQueue::switchtocq(), and simlib3::CalendarQueue::visualize().
|
inline |
fast special operations for list swap (Dangerous!):
Definition at line 349 of file calendar.cc.
References first(), and simlib3::EventNoticeLinkBase::remove().
Referenced by simlib3::CalendarQueue::Resize(), simlib3::CalendarQueue::switchtocq(), and simlib3::CalendarQueue::switchtolist().
|
inline |
Definition at line 288 of file calendar.cc.
References begin().
Referenced by extract_first(), and remove_first().
|
inline |
Definition at line 287 of file calendar.cc.
References begin().
Referenced by simlib3::CalendarList::Get(), simlib3::CalendarQueue::Get(), simlib3::CalendarList::GetFirst(), simlib3::CalendarQueue::GetFirst(), simlib3::CalendarList::ScheduleAt(), and simlib3::CalendarQueue::SearchMinTime().
|
inline |
enqueue operation
Definition at line 311 of file calendar.cc.
References simlib3::EventNotice::Create(), simlib3::EventNoticeLinkBase::insert(), search(), and t.
Referenced by simlib3::CalendarList::ScheduleAt(), and simlib3::CalendarQueue::ScheduleAt().
|
inline |
fast special enqueue operation
Definition at line 355 of file calendar.cc.
References simlib3::EventNoticeLinkBase::insert(), and search().
Referenced by simlib3::CalendarQueue::Resize(), simlib3::CalendarQueue::switchtocq(), and simlib3::CalendarQueue::switchtolist().
special dequeue operation for rescheduling
Definition at line 318 of file calendar.cc.
References simlib3::EventNotice::Destroy(), and simlib3::Entity::GetEventNotice().
Referenced by simlib3::CalendarList::Get(), and simlib3::CalendarQueue::Get().
|
inline |
dequeue operation
Definition at line 324 of file calendar.cc.
References simlib3::EventNotice::Destroy(), simlib3::EventNotice::entity, and first().
Referenced by clear(), simlib3::CalendarList::GetFirst(), and simlib3::CalendarQueue::GetFirst().
|
inlineprivate |
search — linear search for insert position
Definition at line 292 of file calendar.cc.
References empty(), end(), simlib3::EventNotice::priority, t, and simlib3::EventNotice::time.
Referenced by insert(), and insert_extracted().
|
private |