MFXEventQue Class Reference

#include <MFXEventQue.h>


Detailed Description

Definition at line 36 of file MFXEventQue.h.


Public Member Functions

void add (void *what)
bool empty ()
 MFXEventQue ()
void pop ()
size_t size ()
void * top ()
 ~MFXEventQue ()

Private Attributes

std::list< void * > myEvents
MFXMutex myMutex

Constructor & Destructor Documentation

MFXEventQue::MFXEventQue (  )  [inline]

Definition at line 38 of file MFXEventQue.h.

00038 { }

MFXEventQue::~MFXEventQue (  )  [inline]

Definition at line 39 of file MFXEventQue.h.

00039 { }


Member Function Documentation

void MFXEventQue::add ( void *  what  ) 

bool MFXEventQue::empty (  ) 

Definition at line 73 of file MFXEventQue.cpp.

References MFXMutex::lock(), myMutex, size(), and MFXMutex::unlock().

Referenced by GUIApplicationWindow::eventOccured(), and GUIApplicationWindow::~GUIApplicationWindow().

00073                    {
00074     myMutex.lock();
00075     bool ret = size()==0;
00076     myMutex.unlock();
00077     return ret;
00078 }

void MFXEventQue::pop (  ) 

Definition at line 48 of file MFXEventQue.cpp.

References MFXMutex::lock(), myEvents, myMutex, and MFXMutex::unlock().

Referenced by GUIApplicationWindow::eventOccured(), and GUIApplicationWindow::~GUIApplicationWindow().

00048                  {
00049     myMutex.lock();
00050     myEvents.erase(myEvents.begin());
00051     myMutex.unlock();
00052 }

size_t MFXEventQue::size (  ) 

Definition at line 64 of file MFXEventQue.cpp.

References MFXMutex::lock(), myEvents, myMutex, and MFXMutex::unlock().

Referenced by empty(), and top().

00064                   {
00065     myMutex.lock();
00066     size_t msize = myEvents.size();
00067     myMutex.unlock();
00068     return msize;
00069 }

void * MFXEventQue::top (  ) 

Definition at line 38 of file MFXEventQue.cpp.

References MFXMutex::lock(), myEvents, myMutex, size(), and MFXMutex::unlock().

Referenced by GUIApplicationWindow::eventOccured(), and GUIApplicationWindow::~GUIApplicationWindow().

00038                  {
00039     assert(size()!=0);
00040     myMutex.lock();
00041     void *ret = *(myEvents.begin());
00042     myMutex.unlock();
00043     return ret;
00044 }


Field Documentation

std::list<void*> MFXEventQue::myEvents [private]

Definition at line 48 of file MFXEventQue.h.

Referenced by add(), pop(), size(), and top().

Definition at line 47 of file MFXEventQue.h.

Referenced by add(), empty(), pop(), size(), and top().


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

Generated on Wed May 5 00:06:46 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6