xvr2::Semaphore Class Reference

#include <Semaphore.h>

Inheritance diagram for xvr2::Semaphore:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class implements mutual exclusion semaphore objects.

Todo:
Document the Semaphore class plz

Definition at line 28 of file Semaphore.h.


Public Types

enum  SchedPolicy { NORMAL, ROUND_ROBIN, FIFO }
 Please use this set of constants to define or stablish a thread execution policy. More...

Public Member Functions

 Semaphore (int x)
 ~Semaphore ()
void wait ()
void trywait ()
void post ()
void getvalue (int *x)
virtual const char * getClassName ()
 Returns the name of the current class.
virtual std::string toString ()

Static Public Member Functions

static void debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)
 Will print a debug message to the screen.
static void debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)

Protected Member Functions

void init (int x)
void destroy ()

Protected Attributes

std::string __cls_name

Friends

std::ostream & operator<< (std::ostream &stream, const Object &s)

Member Enumeration Documentation

enum xvr2::Threading::SchedPolicy [inherited]

Please use this set of constants to define or stablish a thread execution policy.

Enumerator:
NORMAL  Default scheduling policy, non-realtime.
ROUND_ROBIN  Round Robin based realtime scheduling policy.
FIFO  First In First Out based realtime scheduling policy.

Definition at line 30 of file Threading.h.


Constructor & Destructor Documentation

xvr2::Semaphore::Semaphore ( int  x  ) 

xvr2::Semaphore::~Semaphore (  ) 


Member Function Documentation

void xvr2::Semaphore::init ( int  x  )  [protected]

void xvr2::Semaphore::destroy (  )  [protected]

void xvr2::Semaphore::wait (  ) 

void xvr2::Semaphore::trywait (  ) 

void xvr2::Semaphore::post (  ) 

void xvr2::Semaphore::getvalue ( int *  x  ) 

virtual const char* xvr2::Object::getClassName (  )  [virtual, inherited]

Returns the name of the current class.

static void xvr2::Object::debugmsg ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

Will print a debug message to the screen.

static void xvr2::Object::debugmsgln ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

virtual std::string xvr2::Object::toString (  )  [virtual, inherited]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const Object s 
) [friend, inherited]


Member Data Documentation

std::string xvr2::Object::__cls_name [protected, inherited]

Definition at line 30 of file Object.h.


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

Generated on Fri Jun 20 22:55:56 2008 for X-VR2 SDK by  doxygen 1.5.5