log4cpp::threading::ThreadLocalDataHolder< T > Class Template Reference

#include <BoostThreads.hh>

List of all members.

Classes

class  Holder

Public Types

typedef T data_type
typedef T data_type
typedef T data_type
typedef T data_type
typedef T data_type
typedef T data_type

Public Member Functions

T * get () const
T * get () const
T * get () const
T * get () const
T * get () const
T * get () const
T * get () const
T * get () const
T * get () const
T * get () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T & operator* () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * operator-> () const
T * release ()
T * release ()
T * release ()
T * release ()
T * release ()
T * release ()
T * release ()
T * release ()
T * release ()
T * release ()
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
void reset (T *p=NULL)
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()
 ~ThreadLocalDataHolder ()

Static Public Member Functions

static void freeHolder (void *p)
static void freeHolder (void *p)

Private Attributes

T * _data
pthread_key_t _key
omni_thread::key_t _key
DWORD _key
boost::thread_specific_ptr< T > _localData

Detailed Description

template<typename T>
class log4cpp::threading::ThreadLocalDataHolder< T >

This class holds Thread local data of type T, i.e. for each thread a ThreadLocalDataHolder holds 0 or 1 instance of T. The held object must be heap allocated and will be deleted upon termination of the thread to which it belongs.

This class holds Thread local data of type T, i.e. for each thread a ThreadLocalDataHolder holds 0 or 1 instance of T. The held object must be heap allocated and will be deleted upon termination of the thread to wich it belongs. This is an omni_threads based equivalent of Boost.Threads thread_specific_ptr<T> class.

Definition at line 42 of file include/log4cpp/threading/BoostThreads.hh.


Member Typedef Documentation

template<typename T>
typedef T log4cpp::threading::ThreadLocalDataHolder< T >::data_type
template<typename T>
typedef T log4cpp::threading::ThreadLocalDataHolder< T >::data_type
template<typename T>
typedef T log4cpp::threading::ThreadLocalDataHolder< T >::data_type
template<typename T>
typedef T log4cpp::threading::ThreadLocalDataHolder< T >::data_type

Definition at line 88 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
typedef T log4cpp::threading::ThreadLocalDataHolder< T >::data_type

Definition at line 60 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
typedef T log4cpp::threading::ThreadLocalDataHolder< T >::data_type

Definition at line 43 of file include/log4cpp/threading/DummyThreads.hh.


Constructor & Destructor Documentation

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]

Definition at line 45 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]

Definition at line 46 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]

Definition at line 112 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]

Definition at line 115 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]

Definition at line 62 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]

Definition at line 65 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]

Definition at line 90 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]

Definition at line 99 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::ThreadLocalDataHolder (  )  [inline]
template<typename T>
log4cpp::threading::ThreadLocalDataHolder< T >::~ThreadLocalDataHolder (  )  [inline]

Member Function Documentation

template<typename T>
static void log4cpp::threading::ThreadLocalDataHolder< T >::freeHolder ( void *  p  )  [inline, static]
template<typename T>
static void log4cpp::threading::ThreadLocalDataHolder< T >::freeHolder ( void *  p  )  [inline, static]

Definition at line 94 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Obtains the Object held for the current thread.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 72 of file install/include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Obtains the Object held for the current thread.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 122 of file install/include/log4cpp/threading/MSThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Definition at line 107 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Obtains the Object held for the current thread.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 72 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Obtains the Object held for the current thread.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 122 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Definition at line 51 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::get (  )  const [inline]

Definition at line 44 of file include/log4cpp/threading/BoostThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]
template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Obtains the Object held for the current thread.

Precondition:
get() != NULL
Returns:
a reference to the held Object.

Definition at line 91 of file install/include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Obtains the Object held for the current thread.

Precondition:
get() != NULL
Returns:
a reference to the held Object.

Definition at line 139 of file install/include/log4cpp/threading/MSThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]
template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]
template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Definition at line 112 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Obtains the Object held for the current thread.

Precondition:
get() != NULL
Returns:
a reference to the held Object.

Definition at line 91 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Obtains the Object held for the current thread.

Precondition:
get() != NULL
Returns:
a reference to the held Object.

Definition at line 139 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Definition at line 56 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
T& log4cpp::threading::ThreadLocalDataHolder< T >::operator* (  )  const [inline]

Definition at line 49 of file include/log4cpp/threading/BoostThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Obtains the Object held for the current thread. Initially each thread holds NULL.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 84 of file install/include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Obtains the Object held for the current thread. Initially each thread holds NULL.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 132 of file install/include/log4cpp/threading/MSThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Definition at line 111 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Obtains the Object held for the current thread. Initially each thread holds NULL.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 84 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Obtains the Object held for the current thread. Initially each thread holds NULL.

Returns:
a pointer to the held Object or NULL if no Object has been set for the current thread.

Definition at line 132 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Definition at line 55 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::operator-> (  )  const [inline]

Definition at line 48 of file include/log4cpp/threading/BoostThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Releases the Object held for the current thread.

Postcondition:
get() == NULL
Returns:
a pointer to the Object thas was held for the current thread or NULL if no Object was held.

Definition at line 99 of file install/include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Releases the Object held for the current thread.

Postcondition:
get() == NULL
Returns:
a pointer to the Object thas was held for the current thread or NULL if no Object was held.

Definition at line 147 of file install/include/log4cpp/threading/MSThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]
template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Definition at line 114 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Releases the Object held for the current thread.

Postcondition:
get() == NULL
Returns:
a pointer to the Object thas was held for the current thread or NULL if no Object was held.

Definition at line 99 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Releases the Object held for the current thread.

Postcondition:
get() == NULL
Returns:
a pointer to the Object thas was held for the current thread or NULL if no Object was held.

Definition at line 147 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Definition at line 58 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
T* log4cpp::threading::ThreadLocalDataHolder< T >::release (  )  [inline]

Definition at line 51 of file include/log4cpp/threading/BoostThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]
template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Sets a new Object to be held for the current thread. A previously set Object will be deleted.

Parameters:
p the new object to hold.
Postcondition:
get() == p

Definition at line 118 of file install/include/log4cpp/threading/OmniThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Sets a new Object to be held for the current thread. A previously set Object will be deleted.

Parameters:
p the new object to hold.
Postcondition:
get() == p

Definition at line 159 of file install/include/log4cpp/threading/MSThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]
template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]
template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Definition at line 121 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Sets a new Object to be held for the current thread. A previously set Object will be deleted.

Parameters:
p the new object to hold.
Postcondition:
get() == p

Definition at line 118 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Sets a new Object to be held for the current thread. A previously set Object will be deleted.

Parameters:
p the new object to hold.
Postcondition:
get() == p

Definition at line 159 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Definition at line 65 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
void log4cpp::threading::ThreadLocalDataHolder< T >::reset ( T *  p = NULL  )  [inline]

Definition at line 55 of file include/log4cpp/threading/BoostThreads.hh.


Member Data Documentation

template<typename T>
T * log4cpp::threading::ThreadLocalDataHolder< T >::_data [private]

Definition at line 69 of file include/log4cpp/threading/DummyThreads.hh.

template<typename T>
pthread_key_t log4cpp::threading::ThreadLocalDataHolder< T >::_key [private]

Definition at line 85 of file include/log4cpp/threading/PThreads.hh.

template<typename T>
omni_thread::key_t log4cpp::threading::ThreadLocalDataHolder< T >::_key [private]

Definition at line 143 of file include/log4cpp/threading/OmniThreads.hh.

template<typename T>
pthread_key_t log4cpp::threading::ThreadLocalDataHolder< T >::_key [private]

Definition at line 163 of file include/log4cpp/threading/MSThreads.hh.

template<typename T>
boost::thread_specific_ptr< T > log4cpp::threading::ThreadLocalDataHolder< T >::_localData [private]

Definition at line 57 of file include/log4cpp/threading/BoostThreads.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


log4cpp
Author(s): Stephen Roderick
autogenerated on Fri Jan 11 09:51:56 2013