Lunchbox
1.8.0
|
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.
T | the type of data to store in thread-local storage |
D | the destructor callback function. |
Definition at line 42 of file perThread.h.
lunchbox::PerThread< T, D >::PerThread | ( | ) |
lunchbox::PerThread< T, D >::~PerThread | ( | ) |
T * lunchbox::PerThread< T, D >::get | ( | ) |
Definition at line 127 of file perThread.h.
Referenced by lunchbox::PerThread< T, D >::operator==().
const T * lunchbox::PerThread< T, D >::get | ( | ) | const |
bool lunchbox::PerThread< T, D >::isValid | ( | ) | const |
Definition at line 153 of file perThread.h.
bool lunchbox::PerThread< T, D >::operator! | ( | ) | const |
Definition at line 148 of file perThread.h.
|
inline |
Definition at line 88 of file perThread.h.
|
inline |
Definition at line 65 of file perThread.h.
References lunchbox::className().
|
inline |
Definition at line 68 of file perThread.h.
References lunchbox::className().
T * lunchbox::PerThread< T, D >::operator-> | ( | ) |
const T * lunchbox::PerThread< T, D >::operator-> | ( | ) | const |
PerThread< T, D > & lunchbox::PerThread< T, D >::operator= | ( | const T * | data | ) |
Assign an object to the thread-local storage.
Definition at line 114 of file perThread.h.
PerThread< T, D > & lunchbox::PerThread< T, D >::operator= | ( | const PerThread< T, D > & | rhs | ) |
Assign an object from another thread-local storage.
Definition at line 121 of file perThread.h.
References lunchbox::TLS::get().
|
inline |
Definition at line 75 of file perThread.h.
References lunchbox::PerThread< T, D >::get().
|
inline |
Definition at line 82 of file perThread.h.