SIMLIB/C++  3.07
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 More...
 
Entityremove (Entity *e)
 special dequeue operation for rescheduling More...
 
Entityremove_first ()
 dequeue operation More...
 
 CalendarListImplementation ()
 
void clear (bool destroy)
 remove all items More...
 
 ~ CalendarListImplementation ()
 
void debug_print ()
 print of calendar contents - FOR DEBUGGING ONLY More...
 
EventNoticeextract_first ()
 fast special operations for list swap (Dangerous!): More...
 
void insert_extracted (EventNotice *evn)
 fast special enqueue operation More...
 

Private Member Functions

iterator search (EventNotice *en)
 search — linear search for insert position More...
 

Private Attributes

EventNoticeLinkBase l
 head of circular list More...
 

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

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 simlib3::SimObject::isAllocated().

Referenced by simlib3::CalendarQueue::clear().

◆ debug_print()

void simlib3::CalendarListImplementation::debug_print ( )

print of calendar contents - FOR DEBUGGING ONLY

Definition at line 1136 of file calendar.cc.

References simlib3::Print().

Referenced by 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 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.

◆ first_time()

double simlib3::CalendarListImplementation::first_time ( )
inline

◆ insert()

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

enqueue operation

Definition at line 311 of file calendar.cc.

References simlib3::EventNotice::Create(), and simlib3::EventNoticeLinkBase::insert().

Referenced by simlib3::CalendarQueue::ScheduleAt().

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

Referenced by simlib3::CalendarQueue::Get().

◆ remove_first()

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

dequeue operation

Definition at line 324 of file calendar.cc.

References simlib3::EventNotice::Destroy().

Referenced by simlib3::CalendarQueue::GetFirst().

◆ search()

iterator simlib3::CalendarListImplementation::search ( EventNotice en)
inlineprivate

search — linear search for insert position

Definition at line 292 of file calendar.cc.

References simlib3::EventNotice::priority, t, and simlib3::EventNotice::time.

Member Data Documentation

◆ l

EventNoticeLinkBase simlib3::CalendarListImplementation::l
private

head of circular list

Definition at line 265 of file calendar.cc.


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