mx::mxSem Class Reference

List of all members.

Public Member Functions

 mxSem (unsigned int value)
 ~mxSem ()
const unsigned int currentValue () const
int wait ()
int tryWait ()
int waitTimeout (unsigned int interval)
int post ()


Detailed Description

Definition at line 31 of file mxsemaphore.h.


Constructor & Destructor Documentation

mx::mxSem::mxSem ( unsigned int  value  )  [explicit]

constructor

Definition at line 24 of file mxsemaphore.cpp.

00025         {
00026 
00027                 sem = SDL_CreateSemaphore(value);
00028 
00029 
00030         }

mx::mxSem::~mxSem (  ) 

destructor

Definition at line 32 of file mxsemaphore.cpp.

00033         {
00034 
00035                 if(sem != 0)
00036                         SDL_DestroySemaphore(sem);
00037 
00038         }


Member Function Documentation

const unsigned int mx::mxSem::currentValue (  )  const

currentValue

Definition at line 40 of file mxsemaphore.cpp.

00041         {
00042 
00043                 return SDL_SemValue(sem);
00044 
00045         }

int mx::mxSem::post (  ) 

post

Definition at line 68 of file mxsemaphore.cpp.

00069         {
00070                 return SDL_SemPost(sem);
00071         }

int mx::mxSem::tryWait (  ) 

tryWait

Definition at line 54 of file mxsemaphore.cpp.

00055         {
00056 
00057                 return SDL_SemTryWait(sem);
00058 
00059         }

int mx::mxSem::wait (  ) 

wait

Definition at line 47 of file mxsemaphore.cpp.

00048         {
00049 
00050                 return SDL_SemWait(sem);
00051 
00052         }

int mx::mxSem::waitTimeout ( unsigned int  interval  ) 

waitTimeout

Definition at line 61 of file mxsemaphore.cpp.

00062         {
00063 
00064                 return SDL_SemWaitTimeout(sem, interval);
00065 
00066         }


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

Generated on Wed Jun 10 14:52:02 2009 for libmx by  doxygen 1.5.8