SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
simlib3::CalendarListImplementation Class Reference

class CalendarListImplementation — sorted list More...

Collaboration diagram for simlib3::CalendarListImplementation:
Collaboration graph
[legend]

Classes

class  iterator
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
bool empty ()
 
double first_time ()
 
EventNoticefirst ()
 
void insert (Entity *e, double t)
 enqueue operation
 
Entityremove (Entity *e)
 special dequeue operation for rescheduling
 
Entityremove_first ()
 dequeue operation
 
 CalendarListImplementation ()
 
void clear (bool destroy)
 remove all items
 
 ~CalendarListImplementation ()
 
void debug_print ()
 print of calendar contents - FOR DEBUGGING ONLY
 
EventNoticeextract_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
 

Detailed Description

class CalendarListImplementation — sorted list

Definition at line 264 of file calendar.cc.

Constructor & Destructor Documentation

◆ CalendarListImplementation()

simlib3::CalendarListImplementation::CalendarListImplementation ( )
inline

Definition at line 330 of file calendar.cc.

◆ ~CalendarListImplementation()

simlib3::CalendarListImplementation::~CalendarListImplementation ( )
inline

Definition at line 339 of file calendar.cc.

References simlib3::allocator, simlib3::EventNoticeAllocator::clear(), and clear().

Member Function Documentation

◆ begin()

iterator simlib3::CalendarListImplementation::begin ( )
inline

◆ clear()

void simlib3::CalendarListImplementation::clear ( bool  destroy)
inline

remove all items

Parameters
destroydeallocates 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().

◆ debug_print()

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().

◆ empty()

bool simlib3::CalendarListImplementation::empty ( )
inline

◆ end()

iterator simlib3::CalendarListImplementation::end ( )
inline

◆ extract_first()

EventNotice * simlib3::CalendarListImplementation::extract_first ( )
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().

◆ first()

EventNotice * simlib3::CalendarListImplementation::first ( )
inline

Definition at line 288 of file calendar.cc.

References begin().

Referenced by extract_first(), and remove_first().

◆ first_time()

double simlib3::CalendarListImplementation::first_time ( )
inline

◆ insert()

void simlib3::CalendarListImplementation::insert ( Entity e,
double  t 
)
inline

◆ insert_extracted()

void simlib3::CalendarListImplementation::insert_extracted ( EventNotice evn)
inline

◆ remove()

Entity * simlib3::CalendarListImplementation::remove ( Entity e)
inline

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().

◆ remove_first()

Entity * simlib3::CalendarListImplementation::remove_first ( )
inline

◆ search()

iterator simlib3::CalendarListImplementation::search ( EventNotice en)
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().

Member Data Documentation

◆ l

EventNoticeLinkBase simlib3::CalendarListImplementation::l
private

head of circular list

Definition at line 265 of file calendar.cc.

Referenced by begin(), and end().


The documentation for this class was generated from the following file: