VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkConditionVariable Class Reference

mutual exclusion locking class More...

#include <vtkConditionVariable.h>

Inheritance diagram for vtkConditionVariable:
Inheritance graph
[legend]
Collaboration diagram for vtkConditionVariable:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkConditionVariableNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void Signal ()
void Broadcast ()
int Wait (vtkMutexLock *mutex)

Static Public Member Functions

static vtkConditionVariableNew ()
static int IsTypeOf (const char *type)
static vtkConditionVariableSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkConditionVariable ()

Protected Attributes

vtkSimpleConditionVariable SimpleConditionVariable

Detailed Description

mutual exclusion locking class

vtkConditionVariable allows the locking of variables which are accessed through different threads. This header file also defines vtkSimpleConditionVariable which is not a subclass of vtkObject.

The win32 implementation is based on notes provided by Douglas C. Schmidt and Irfan Pyarali, Department of Computer Science, Washington University, St. Louis, Missouri. http://www.cs.wustl.edu/~schmidt/win32-cv-1.html

Tests:
vtkConditionVariable (Tests)

Definition at line 144 of file vtkConditionVariable.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 148 of file vtkConditionVariable.h.


Constructor & Destructor Documentation

Definition at line 168 of file vtkConditionVariable.h.


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

static int vtkConditionVariable::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkConditionVariable::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented from vtkObject.

virtual vtkObjectBase* vtkConditionVariable::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkObject.

Reimplemented from vtkObject.

void vtkConditionVariable::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkConditionVariable::Signal ( ) [inline]

Wake one thread waiting for the condition to change.

Definition at line 180 of file vtkConditionVariable.h.

Wake all threads waiting for the condition to change.

Definition at line 185 of file vtkConditionVariable.h.

Wait for the condition to change. Upon entry, the mutex must be locked and the lock held by the calling thread. Upon exit, the mutex will be locked and held by the calling thread. Between entry and exit, the mutex will be unlocked and may be held by other threads.

Parameters:
mutexThe mutex that should be locked on entry and will be locked on exit (but not in between)
Return values:
Normally,thisfunction returns 0. Should a thread be interrupted by a signal, a non-zero value may be returned.

Definition at line 190 of file vtkConditionVariable.h.


Member Data Documentation

Definition at line 171 of file vtkConditionVariable.h.


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