Equalizer
1.2.1
|
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, D > & | operator= (const T *data) |
Assign an object to the thread-local storage. | |
PerThread< T, D > & | operator= (const PerThread< T, D > &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. | |
T & | operator* () |
const T & | operator* () const |
bool | operator== (const PerThread &rhs) const |
bool | operator== (const T *rhs) const |
bool | operator!= (const T *rhs) const |
bool | operator! () const |
bool | isValid () const |
Implements thread-specific storage for C++ objects.
The default destructor function deletes the object on thread exit.
To instantiate the template code for this class, applications have to include pthread.h before this file. The pthread.h header is not automatically included to avoid hard to resolve type conflicts with other header files on Windows.
T | the type of data to store in thread-local storage |
D | the destructor callback function. |
Definition at line 52 of file perThread.h.
co::base::PerThread< T, D >::PerThread | ( | ) |
Construct a new per-thread variable.
co::base::PerThread< T, D >::~PerThread | ( | ) |
Destruct the per-thread variable.
T* co::base::PerThread< T, D >::get | ( | ) |
Referenced by co::base::PerThread< T, D >::operator==().
const T* co::base::PerThread< T, D >::get | ( | ) | const |
bool co::base::PerThread< T, D >::isValid | ( | ) | const |
bool co::base::PerThread< T, D >::operator! | ( | ) | const |
bool co::base::PerThread< T, D >::operator!= | ( | const T * | rhs | ) | const [inline] |
Definition at line 98 of file perThread.h.
T& co::base::PerThread< T, D >::operator* | ( | ) | [inline] |
Definition at line 75 of file perThread.h.
References co::base::className().
const T& co::base::PerThread< T, D >::operator* | ( | ) | const [inline] |
Definition at line 78 of file perThread.h.
References co::base::className().
T* co::base::PerThread< T, D >::operator-> | ( | ) |
Access the thread-local object.
const T* co::base::PerThread< T, D >::operator-> | ( | ) | const |
Access the thread-local object.
PerThread<T, D>& co::base::PerThread< T, D >::operator= | ( | const T * | data | ) |
Assign an object to the thread-local storage.
PerThread<T, D>& co::base::PerThread< T, D >::operator= | ( | const PerThread< T, D > & | rhs | ) |
Assign an object from another thread-local storage.
bool co::base::PerThread< T, D >::operator== | ( | const PerThread< T, D > & | rhs | ) | const [inline] |
Definition at line 85 of file perThread.h.
References co::base::PerThread< T, D >::get().
bool co::base::PerThread< T, D >::operator== | ( | const T * | rhs | ) | const [inline] |
Definition at line 92 of file perThread.h.