eq::base::PerThread< T > Class Template Reference

Implements thread-specific storage for C++ objects. More...

#include <perThread.h>

Inheritance diagram for eq::base::PerThread< T >:

Inheritance graph
[legend]
Collaboration diagram for eq::base::PerThread< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PerThread ()
 Construct a new per-thread variable.
 ~PerThread ()
 Destruct the per-thread variable.
PerThread< T > & operator= (const T *data)
 Assign an object to the thread-local storage.
PerThread< T > & operator= (const PerThread< T > &rhs)
 Assign an object from another thread-local storage.
T * get ()
const T * get () const
T * operator-> ()
 Access the thread-local object.
const T * operator-> () const
 Access the thread-local object.
bool operator== (const PerThread &rhs) const
bool operator== (const T *rhs) const
bool operator!= (const T *rhs) const

Protected Member Functions

virtual void notifyExecutionStopping ()
 Notify that the execution unit is about to stop.


Detailed Description

template<typename T>
class eq::base::PerThread< T >

Implements thread-specific storage for C++ objects.

The object has to implement notifyPerThreadDelete().

Definition at line 39 of file perThread.h.


Constructor & Destructor Documentation

template<typename T>
eq::base::PerThread< T >::PerThread (  ) 

Construct a new per-thread variable.

template<typename T>
eq::base::PerThread< T >::~PerThread (  ) 

Destruct the per-thread variable.


Member Function Documentation

template<typename T>
PerThread<T>& eq::base::PerThread< T >::operator= ( const T *  data  ) 

Assign an object to the thread-local storage.

template<typename T>
PerThread<T>& eq::base::PerThread< T >::operator= ( const PerThread< T > &  rhs  ) 

Assign an object from another thread-local storage.

template<typename T>
T* eq::base::PerThread< T >::get (  ) 

Returns:
the held object pointer.

Referenced by eq::base::PerThread< T >::operator==().

Here is the caller graph for this function:

template<typename T>
const T* eq::base::PerThread< T >::get (  )  const

Returns:
the held object pointer.

template<typename T>
T* eq::base::PerThread< T >::operator-> (  ) 

Access the thread-local object.

template<typename T>
const T* eq::base::PerThread< T >::operator-> (  )  const

Access the thread-local object.

template<typename T>
bool eq::base::PerThread< T >::operator== ( const PerThread< T > &  rhs  )  const [inline]

Returns:
true if the thread-local variables hold the same object.

Definition at line 63 of file perThread.h.

References eq::base::PerThread< T >::get().

Here is the call graph for this function:

template<typename T>
bool eq::base::PerThread< T >::operator== ( const T *  rhs  )  const [inline]

Returns:
true if the thread-local variable holds the same object.

Definition at line 66 of file perThread.h.

template<typename T>
bool eq::base::PerThread< T >::operator!= ( const T *  rhs  )  const [inline]

Returns:
true if the thread-local variable holds another object.

Definition at line 68 of file perThread.h.

template<typename T>
virtual void eq::base::PerThread< T >::notifyExecutionStopping (  )  [protected, virtual]

Notify that the execution unit is about to stop.

Reimplemented from eq::base::ExecutionListener.


The documentation for this class was generated from the following file:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8