CVD::EventObject Class Reference

#include <eventobject.h>

Inheritance diagram for CVD::EventObject:

CVD::Synchronized

List of all members.


Detailed Description

Encapsulation of a condition variable and its boolean condition.

Definition at line 9 of file eventobject.h.


Public Member Functions

 EventObject ()
void trigger ()
void triggerAll ()
void wait ()
bool wait (unsigned int milli)

Protected Attributes

pthread_cond_t myCondVar

Constructor & Destructor Documentation

CVD::EventObject::EventObject (  ) 

Construct an initially untriggered event.


Member Function Documentation

void CVD::EventObject::trigger (  ) 

Set the condition boolean to true and wake up one thread waiting on the event.

Referenced by CVD::ReadAheadVideoBuffer< T >::get_frame(), CVD::ReadAheadVideoBuffer< T >::run(), and CVD::ReadAheadVideoBuffer< T >::~ReadAheadVideoBuffer().

void CVD::EventObject::triggerAll (  ) 

Set the condition boolean to true and wake up all threads waiting on the event.

Referenced by CVD::ReadAheadVideoBuffer< T >::seek_to().

void CVD::EventObject::wait (  ) 

Block until the condition is true. Reset the condition before returning.

Referenced by CVD::ReadAheadVideoBuffer< T >::get_frame(), and CVD::ReadAheadVideoBuffer< T >::run().

bool CVD::EventObject::wait ( unsigned int  milli  ) 

Block until the condition is true or the specified timeout has elapsed. Reset the condition before returning if the condition became true.


The documentation for this class was generated from the following file:
Generated on Wed Feb 18 10:23:06 2009 for CVD by  doxygen 1.5.3