tEventQueue Class Reference

#include <tEventQueue.h>

Inheritance diagram for tEventQueue:

Inheritance graph
[legend]
Collaboration diagram for tEventQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tEventQueue ()
 ~tEventQueue ()
void Timestep (REAL time)

Private Attributes

REAL currentTime


Detailed Description

Definition at line 76 of file tEventQueue.h.


Constructor & Destructor Documentation

tEventQueue::tEventQueue (  )  [inline]

Definition at line 80 of file tEventQueue.h.

00080 :currentTime(0){}

tEventQueue::~tEventQueue (  ) 

Definition at line 35 of file tEventQueue.cpp.

References tHeap< tEvent >::Events(), and tHeap< tEvent >::Len().

00035                          {
00036     for(int i=Len()-1;i>=0;i--)
00037         delete Events(i);
00038 }

Here is the call graph for this function:


Member Function Documentation

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 }

Here is the call graph for this function:


Member Data Documentation

REAL tEventQueue::currentTime [private]

Definition at line 77 of file tEventQueue.h.


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:56:24 2008 for Armagetron Advanced by  doxygen 1.5.4