Template class for per instance thread Local Storage. More...
#include <Inventor/threads/SbThreadStorage.h>
Public Member Functions | |
SbThreadStorage () | |
Default constructor. | |
SbThreadStorage (const T t) | |
virtual | ~SbThreadStorage () |
Storage destructor: Find current storage in the global storage map, Delete thread dependent entry, And remove each entry. | |
SbThreadStorage< T > & | operator= (T t) |
Override operator= Set value of the storage for current thread. | |
T | operator-> () const |
Override operator-> Gets value of the storage for current thread. | |
T | operator* () const |
Override operator T*() Destroying objects from delete operator is not allowed. | |
operator bool () const | |
Override operator bool() Comparing templated objects work as comparing direct object. | |
template<typename Func > | |
void | call (Func f) |
Calls the passed function to all registered threads object. | |
template<typename Func , typename Param > | |
void | call (Func f, Param p) |
Calls the passed function to all registered threads object. | |
Template class for per instance thread Local Storage.
This class provides a way to declare a class member as a thread Specific variables.
Definition at line 42 of file SbThreadStorage.h.
|
inline |
Default constructor.
Definition at line 1 of file SbThreadStorage.h.
|
inline |
Definition at line 1 of file SbThreadStorage.h.
|
inlinevirtual |
Storage destructor: Find current storage in the global storage map, Delete thread dependent entry, And remove each entry.
Definition at line 64 of file SbThreadStorage.h.
Calls the passed function to all registered threads object.
Definition at line 118 of file SbThreadStorage.h.
|
inline |
Calls the passed function to all registered threads object.
Definition at line 135 of file SbThreadStorage.h.
|
inline |
Override operator bool() Comparing templated objects work as comparing direct object.
for example, for: SbThreadStorage< SoCache* > m_cache; doing: m_cache == NULL run as doing
Definition at line 111 of file SbThreadStorage.h.
|
inline |
Override operator T*() Destroying objects from delete operator is not allowed.
Definition at line 99 of file SbThreadStorage.h.
|
inline |
Override operator-> Gets value of the storage for current thread.
Returns NULL if the storage does not exist for current thread.
Definition at line 83 of file SbThreadStorage.h.
|
inline |
Override operator= Set value of the storage for current thread.
If current thread storage was not existing, create it.
Definition at line 72 of file SbThreadStorage.h.