Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::WaitFlag Class Reference

Wait flag synchronization primitive. Can be used to wait for a certain event to occur. More...

#include <mitsuba/core/lock.h>

+ Inheritance diagram for mitsuba::WaitFlag:

Public Member Functions

 WaitFlag (bool flag=false)
 Create a new wait flag. More...
 
const boolget () const
 Return the current flag value. More...
 
void set (bool value)
 Set the value of the flag. More...
 
void wait ()
 Wait for the flag to be set to true. More...
 
bool wait (int ms)
 Temporarily wait for the flag to be set to true. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

virtual ~WaitFlag ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 

Detailed Description

Wait flag synchronization primitive. Can be used to wait for a certain event to occur.

Constructor & Destructor Documentation

mitsuba::WaitFlag::WaitFlag ( bool  flag = false)

Create a new wait flag.

Parameters
flagInitial state of the flag. If set to true, wait() will immediately return.
virtual mitsuba::WaitFlag::~WaitFlag ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

const bool& mitsuba::WaitFlag::get ( ) const

Return the current flag value.

virtual const Class* mitsuba::WaitFlag::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from Object.

void mitsuba::WaitFlag::set ( bool  value)

Set the value of the flag.

void mitsuba::WaitFlag::wait ( )

Wait for the flag to be set to true.

bool mitsuba::WaitFlag::wait ( int  ms)

Temporarily wait for the flag to be set to true.

Similar to wait(), but also uses a time value given in milliseconds. A return value of false signals that a timeout has occurred.

Parameters
msMaximum waiting time in milliseconds

Member Data Documentation

Class* mitsuba::WaitFlag::m_theClass
static

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