#include <tEventQueue.h>
Public Member Functions | |
tEventQueue () | |
~tEventQueue () | |
void | Timestep (REAL time) |
Private Attributes | |
REAL | currentTime |
Definition at line 76 of file tEventQueue.h.
tEventQueue::tEventQueue | ( | ) | [inline] |
tEventQueue::~tEventQueue | ( | ) |
Definition at line 35 of file tEventQueue.cpp.
References tHeap< tEvent >::Events(), and tHeap< tEvent >::Len().
void tEventQueue::Timestep | ( | REAL | time | ) |
Definition at line 40 of file tEventQueue.cpp.
References tEvent::Check(), tHeapBase::CheckHeap(), tHeap< tEvent >::Events(), tHeap< tEvent >::Len(), tHeap< tEvent >::Remove(), and tHeap< tEvent >::Replace().
00040 { 00041 tEvent *e; 00042 // process the bottom of the heap as long as there is work to do there: 00043 while(Len() && (e=Events(0))->Val() < time){ 00044 00045 #ifdef EVENT_DEB 00046 CheckHeap(); 00047 #endif 00048 00049 if (e->Check(time)) 00050 Replace(e); // location of e may have changed 00051 else 00052 { 00053 Remove(e); 00054 delete e; 00055 } 00056 } 00057 00058 #ifdef EVENT_DEB 00059 CheckHeap(); 00060 #endif 00061 }
REAL tEventQueue::currentTime [private] |
Definition at line 77 of file tEventQueue.h.