Implements thread-specific storage for C++ objects. More...
#include <perThread.h>


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 |
| bool | operator! () const |
| bool | isValid () const |
Protected Member Functions | |
| virtual void | notifyExecutionStopping () |
| Notify that the execution unit is about to stop. | |
Implements thread-specific storage for C++ objects.
The object has to implement notifyPerThreadDelete().
To instantiate the template code for this class, applications have to include pthread.h before this file. pthread.h is not automatically included to avoid hard to resolve type conflicts with other header files on Windows.
Definition at line 44 of file perThread.h.
| eq::base::PerThread< T >::PerThread | ( | ) |
Construct a new per-thread variable.
| eq::base::PerThread< T >::~PerThread | ( | ) |
Destruct the per-thread variable.
| PerThread<T>& eq::base::PerThread< T >::operator= | ( | const T * | data | ) |
Assign an object to the thread-local storage.
| PerThread<T>& eq::base::PerThread< T >::operator= | ( | const PerThread< T > & | rhs | ) |
Assign an object from another thread-local storage.
Reimplemented from eq::base::NonCopyable.
| T* eq::base::PerThread< T >::get | ( | ) |
Referenced by eq::base::PerThread< T >::operator==().

| const T* eq::base::PerThread< T >::get | ( | ) | const |
| T* eq::base::PerThread< T >::operator-> | ( | ) |
Access the thread-local object.
| const T* eq::base::PerThread< T >::operator-> | ( | ) | const |
Access the thread-local object.
| bool eq::base::PerThread< T >::operator== | ( | const PerThread< T > & | rhs | ) | const [inline] |
Definition at line 71 of file perThread.h.
References eq::base::PerThread< T >::get().

| bool eq::base::PerThread< T >::operator== | ( | const T * | rhs | ) | const [inline] |
Definition at line 78 of file perThread.h.
| bool eq::base::PerThread< T >::operator!= | ( | const T * | rhs | ) | const [inline] |
Definition at line 84 of file perThread.h.
| bool eq::base::PerThread< T >::operator! | ( | ) | const |
| bool eq::base::PerThread< T >::isValid | ( | ) | const |
| virtual void eq::base::PerThread< T >::notifyExecutionStopping | ( | ) | [protected, virtual] |
Notify that the execution unit is about to stop.
Reimplemented from eq::base::ExecutionListener.
0.9.1 by
1.6.1