Public Member Functions | List of all members
SpecialEventQueueSTL Class Reference

#include <SEQEventQueue.h>

Public Member Functions

int cancelEvent (int pEventID)
 
int cancelEvent (int pEventID, Star *pDest)
 
int cancelEvent (const Type *pData, Star *pDest)
 
int cancelEvent (const TypeRef &pData, Star *pDest)
 
void clearFreeEvents ()
 
bool empty () const
 
SpecialEventEntryCget ()
 
SpecialEventEntryCgetFreeEvent ()
 
double getTimeOfEvent (int pEventID, Star *pDest) const
 
void initialize ()
 
bool isScheduled (int pEventID, Star *pDest) const
 
int length () const
 
void levelput (const SpecialEvent *pEmiter, Star *pDest, Type *pData, double pLevel, int pEvID)
 
void levelput (const SpecialEvent *pEmiter, Star *pDest, Type *pData, double pLevel, double pFineLevel, int pEvID)
 
double lowestPriority () const
 
void pop ()
 
void pushBack (SpecialEventEntryC *pEvent)
 
void putFreeEvent (SpecialEventEntryC *pEvent)
 
const SpecialEventEntryCtop () const
 

Detailed Description

Special Event queue replacement based on the stl

Member Function Documentation

int SpecialEventQueueSTL::cancelEvent ( int  pEventID)

Remove a link with a given ID.

int SpecialEventQueueSTL::cancelEvent ( int  pEventID,
Star *  pDest 
)

Remove a link with given ID and destination star.

Warning
In the current implementation, implemented as in SEQEventQueue, the pStar argument is ignored.
void SpecialEventQueueSTL::clearFreeEvents ( )

Clear the the collecion of free event link structures and free its memory.

bool SpecialEventQueueSTL::empty ( ) const
inline

Query whether the queue is empty

SpecialEventEntryC* SpecialEventQueueSTL::get ( )
inline

Return the first element and remove it from the queue. This element must be freed (or recycled) by the user.

Returns
The foremost element of the queue. NULL if the queue is empty.
SpecialEventEntryC* SpecialEventQueueSTL::getFreeEvent ( )
inline

Get a free special event entry structure, either from the list of free links or, if necessary, a newly allocated one.

double SpecialEventQueueSTL::getTimeOfEvent ( int  pEventID,
Star *  pDest 
) const

Return the time stamp for a given event, -1 if the event is not in the queue.

void SpecialEventQueueSTL::initialize ( )

Remaove all entries from the queue.

bool SpecialEventQueueSTL::isScheduled ( int  pEventID,
Star *  pDest 
) const

Returns TRUE if there is an entry in queue for the specified id

int SpecialEventQueueSTL::length ( ) const
inline

Return the number of events in the queue.

void SpecialEventQueueSTL::levelput ( const SpecialEvent *  pEmiter,
Star *  pDest,
Type *  pData,
double  pLevel,
int  pEvID 
)

Create a link with the given parameters and insert it into the queue.

double SpecialEventQueueSTL::lowestPriority ( ) const
inline

Return the timestamp of the element at the front of the queue, inf if the queue is empty.

void SpecialEventQueueSTL::pop ( )
inline

Remove the first element from the queue. The link is put to the store of free links internally.

void SpecialEventQueueSTL::pushBack ( SpecialEventEntryC pEvent)
inline

Reinsert a previously removed link to the top of the queue,

void SpecialEventQueueSTL::putFreeEvent ( SpecialEventEntryC pEvent)
inline

Put a link into the collection of free links.

const SpecialEventEntryC* SpecialEventQueueSTL::top ( ) const
inline

Return the foremost element without removing it.