libcommonc++
0.7
|
Thread-local numeric counter. More...
#include <ThreadLocalCounter.h++>
Public Member Functions | |
ThreadLocalCounter () | |
Construct a new ThreadLocalCounter with an initial value of 0. More... | |
virtual | ~ThreadLocalCounter () |
Destructor. More... | |
int32_t & | operator* () |
Pointer-dereference operator. More... | |
int32_t * | operator-> () |
Pointer operator. More... | |
void | setValue (int32_t *value) |
Set the value of the thread-local object for the calling thread. More... | |
int32_t * | getValue () |
Get the value of the thread-local object for the calling thread. More... | |
Static Public Member Functions | |
static int | getSlotCount () |
Get the maximum number of thread-local storage slots available on this platform. More... | |
Protected Member Functions | |
int32_t * | initialValue () |
Provide the intial value of the thread-local object for the calling thread. More... | |
Thread-local numeric counter.
The counter exists as a separate instance for each calling thread.
Construct a new ThreadLocalCounter with an initial value of 0.
|
virtual |
Destructor.
|
staticinherited |
Get the maximum number of thread-local storage slots available on this platform.
A return value of -1 indicates that there is no limit.
|
inherited |
Get the value of the thread-local object for the calling thread.
|
protectedvirtual |
Provide the intial value of the thread-local object for the calling thread.
The default implementation returns NULL.
Reimplemented from ThreadLocal< int32_t >.
|
inherited |
Pointer-dereference operator.
NullPointerException | If the value of the object was never initialized for the calling thread. |
|
inherited |
Pointer operator.
NullPointerException | If the value of the object was never initialized for the calling thread. |
|
inherited |
Set the value of the thread-local object for the calling thread.
value | The new value. |