#include <itkBarrier.h>
Inheritance diagram for itk::Barrier:


A barrier class is used to synchronize threaded execution by allowing threads to block until each has reached a desired state. As each thread enters the barrier it blocks. When all threads have entered the barrier, all released and continue to execute.
A thread enters the barrier by calling Wait() on the barrier class. To set up a barrier class, call Initialize(n) where n is the number of waiting threads that will trigger a release of the barrier.
Definition at line 61 of file itkBarrier.h.
Public Types | |
| typedef SmartPointer< const Self > | ConstPointer |
| typedef SmartPointer< Self > | Pointer |
| typedef Barrier | Self |
| typedef LightObject | Superclass |
Public Member Functions | |
| virtual Pointer | CreateAnother () const |
| virtual void | Delete () |
| virtual const char * | GetNameOfClass () const |
| virtual int | GetReferenceCount () const |
| void | Initialize (unsigned int) |
| void | Print (std::ostream &os, Indent indent=0) const |
| virtual void | Register () const |
| virtual void | SetReferenceCount (int) |
| virtual void | UnRegister () const |
| void | Wait () |
Static Public Member Functions | |
| static void | BreakOnError () |
| static Pointer | New () |
Protected Member Functions | |
| virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
Protected Attributes | |
| int | m_ReferenceCount |
| SimpleFastMutexLock | m_ReferenceCountLock |
| Methods invoked by virtual 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.*/virtual void PrintSelf(std voi | PrintHeader )(std::ostream &os, Indent indent) const |
|
|
Reimplemented from itk::LightObject. Definition at line 69 of file itkBarrier.h. |
|
|
Reimplemented from itk::LightObject. Definition at line 68 of file itkBarrier.h. |
|
|
Standard class typedefs. Reimplemented from itk::LightObject. Definition at line 66 of file itkBarrier.h. |
|
|
Definition at line 67 of file itkBarrier.h. |
|
|
This method is called when itkExceptionMacro executes. It allows the debugger to break on error. |
|
|
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class. Reimplemented in itk::Object. |
|
|
Delete an itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting. |
|
|
Run-time type information (and related methods). Reimplemented from itk::LightObject. |
|
|
Gets the reference count on this object. Definition at line 98 of file itkLightObject.h. |
|
|
Creates a new system variable used to implement the barrier. The argument to this method is the number of threads that must Wait() on the barrier before it is cleared. |
|
|
Method for creation through the object factory. Reimplemented from itk::LightObject. |
|
||||||||||||
|
Cause the object to print itself out. |
|
||||||||||||
|
|
|
|
Increase the reference count (mark as used by another object). Reimplemented in itk::Object. |
|
|
Sets the reference count on this object. This is a dangerous method, use it with care. Reimplemented in itk::Object. |
|
|
Decrease the reference count (release by another object). Reimplemented in itk::Object. |
|
|
A thread calling this method waits until m_NumberOfThreads have called Wait() on the barrier. When the final expected thread calls Wait(), all threads are released. |
|
|
Number of uses of this object by other objects. Definition at line 119 of file itkLightObject.h. |
|
|
Mutex lock to protect modification to the reference count Definition at line 122 of file itkLightObject.h. |
|
|
|
1.4.2 written by Dimitri van Heesch,
© 1997-2000