Public Member Functions | List of all members
TwoLevelEventQueuePriorityFree Class Reference
Inheritance diagram for TwoLevelEventQueuePriorityFree:
TwoLevelQueueBase< lesserSPQEventWithFineLevel >

Public Member Functions

 TwoLevelEventQueuePriorityFree (const DEBaseSched &pSched)
 
LevelLink * levelput (Pointer a, double v, double fv)
 
LevelLink * levelputSE (Pointer a, double v, double fv)
 
void pushHead (Particle *p, PortHole *ph, double v, double fv)
 
void pushTail (Particle *p, PortHole *ph, double v, double fv)
 
- Public Member Functions inherited from TwoLevelQueueBase< lesserSPQEventWithFineLevel >
 TwoLevelQueueBase (const DEBaseSched &pSched)
 
unsigned int cancelEvent (const SpecialEvent *pEv, int pEventID)
 
unsigned int cancelEvent (const SpecialEvent *pEv, const Type *pData)
 
unsigned int cancelEvent (int pEvID, const Star *pDest)
 
double getTimeOfEvent (const SpecialEvent *pEv, int pEventID) const
 
bool isScheduled (const SpecialEvent *pEv, int pEventID) const
 
StringList printCurrentStack () const
 
StringList printHeap () const
 
void moveCurrentToStack (double pCurrentTime)
 
const SPQEventgetCurrentStackFront () const
 
void popCurrentStack ()
 
bool stackEmpty () const
 
int stackSize () const
 
const SPQEventstackFront () const
 
cStore::iterator stackBegin ()
 
cStore::iterator stackEnd ()
 
cStackIter eraseFromStack (cStackIter pToDel)
 
void initialize ()
 
bool empty () const
 
int size () const
 
const SPQEventtop () const
 
SPQEventheapTop () const
 
const bool heapEmpty () const
 
const int heapSize () const
 
int deleteEventsForStar (const Star *pStar)
 
int deleteEventsForPort (const PortHole *pPort)
 
SPQEventgetFreeLink ()
 
void putFreeLink (SPQEvent *pLink)
 

Additional Inherited Members

- Public Types inherited from TwoLevelQueueBase< lesserSPQEventWithFineLevel >
typedef std::deque< SPQEvent * > cStore
 
typedef cStore::iterator cStackIter
 
- Protected Types inherited from TwoLevelQueueBase< lesserSPQEventWithFineLevel >
typedef std::vector< SPQEvent * > cHeap
 
- Protected Member Functions inherited from TwoLevelQueueBase< lesserSPQEventWithFineLevel >
void popHeap ()
 
void putEventToStack (SPQEvent *pEvent)
 
void putHeap (SPQEvent *pE)
 
void putHeap (Particle *pPa, PortHole *pPh, const double &pL, const double &pFL)
 
void putHeap (Pointer pP, const double &pL, const double &pFL)
 
- Protected Attributes inherited from TwoLevelQueueBase< lesserSPQEventWithFineLevel >
long mCurrentEventNumber
 
cStore mCurrentStack
 
cStore mGarbageCollect
 
cHeap mHeap
 
unsigned int mNextInputPos
 
const DEBaseSchedmSched
 

Member Function Documentation

LevelLink * TwoLevelEventQueuePriorityFree::levelput ( Pointer  a,
double  v,
double  fv 
)
virtual

Put a pointer into the eventQ

Warning
this method returns (at the moment) a null pointer instead of a level link.

Put a pointer into the eventQ

Implements TwoLevelQueueBase< lesserSPQEventWithFineLevel >.

void TwoLevelEventQueuePriorityFree::pushHead ( Particle *  p,
PortHole *  ph,
double  v,
double  fv 
)
virtual

Contruct and insert a message event into the event queue structure.

Attention
Since this is not a simple list, no distinction between insertion from front or end is made.
Parameters
pThe message particle
phdestination porthole
vtimestamp of th message
fvfinelevel (priority). This value has to be supplied, but is ignored by the associated scheduler.

Implements TwoLevelQueueBase< lesserSPQEventWithFineLevel >.

void TwoLevelEventQueuePriorityFree::pushTail ( Particle *  p,
PortHole *  ph,
double  v,
double  fv 
)
virtual

Contruct and insert a message event into the event queue structure.

Attention
Since this is not a simple list, no distinction between insertion from front or end is made .
Parameters
pThe message particle
phdestination porthole
vtimestamp of th message
fvfinelevel (priority). This value has to be supplied, but is ignored by the associated scheduler.

Implements TwoLevelQueueBase< lesserSPQEventWithFineLevel >.