eq::base::PerThreadRef< T > Class Template Reference

Thread-specific storage for a RefPtr. More...

#include <perThreadRef.h>

Inheritance diagram for eq::base::PerThreadRef< T >:
Inheritance graph
[legend]
Collaboration diagram for eq::base::PerThreadRef< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PerThreadRef ()
 Construct a new per-thread RefPtr.
 ~PerThreadRef ()
 Destruct a per-thread RefPtr.
PerThreadRef< T > & operator= (RefPtr< T > data)
 Assign a RefPtr to the thread-local storage.
PerThreadRef< T > & operator= (const PerThreadRef< T > &rhs)
 Assign a RefPtr to the thread-local storage.
RefPtr< const T > get () const
RefPtr< T > get ()
T * getPointer ()
T * operator-> ()
const T * operator-> () const
bool operator== (const PerThreadRef &rhs) const
bool operator== (const RefPtr< T > &rhs) const
bool operator!= (const RefPtr< T > &rhs) const
bool operator! () const
bool isValid () const

Detailed Description

template<typename T>
class eq::base::PerThreadRef< T >

Thread-specific storage for a RefPtr.

To instantiate the template code for this class, applications have to include pthread.h before this file. pthread.h is not automatically included to avoid hard to resolve type conflicts with other header files on Windows.

Definition at line 39 of file perThreadRef.h.


Constructor & Destructor Documentation

template<typename T>
eq::base::PerThreadRef< T >::PerThreadRef (  ) 

Construct a new per-thread RefPtr.

Version:
1.0
template<typename T>
eq::base::PerThreadRef< T >::~PerThreadRef (  ) 

Destruct a per-thread RefPtr.

Version:
1.0

Member Function Documentation

template<typename T>
PerThreadRef<T>& eq::base::PerThreadRef< T >::operator= ( RefPtr< T >  data  ) 

Assign a RefPtr to the thread-local storage.

Version:
1.0
template<typename T>
PerThreadRef<T>& eq::base::PerThreadRef< T >::operator= ( const PerThreadRef< T > &  rhs  ) 

Assign a RefPtr to the thread-local storage.

Version:
1.0

Reimplemented from eq::base::NonCopyable.

template<typename T>
RefPtr< const T > eq::base::PerThreadRef< T >::get (  )  const
Returns:
the RefPtr from the thread-local storage.
Version:
1.0

Referenced by eq::base::PerThreadRef< T >::operator==().

Here is the caller graph for this function:

template<typename T>
RefPtr< T > eq::base::PerThreadRef< T >::get (  ) 
Returns:
the RefPtr from the thread-local storage.
Version:
1.0
template<typename T>
T* eq::base::PerThreadRef< T >::getPointer (  ) 
Returns:
the C pointer of the RefPtr from the thread-local storage.
Version:
1.0
template<typename T>
T* eq::base::PerThreadRef< T >::operator-> (  ) 
Returns:
the object held by the RefPtr in the thread-local storage.
Version:
1.0
template<typename T>
const T* eq::base::PerThreadRef< T >::operator-> (  )  const
Returns:
the object held by the RefPtr in the thread-local storage.
Version:
1.0
template<typename T>
bool eq::base::PerThreadRef< T >::operator== ( const PerThreadRef< T > &  rhs  )  const [inline]
Returns:
true if the two objects hold the same C pointer.
Version:
1.0

Definition at line 80 of file perThreadRef.h.

References eq::base::PerThreadRef< T >::get().

Here is the call graph for this function:

template<typename T>
bool eq::base::PerThreadRef< T >::operator== ( const RefPtr< T > &  rhs  )  const [inline]
Returns:
true if the two objects hold the same C pointer.
Version:
1.0

Definition at line 87 of file perThreadRef.h.

template<typename T>
bool eq::base::PerThreadRef< T >::operator!= ( const RefPtr< T > &  rhs  )  const [inline]
Returns:
true if the two objects hold the same C pointer.
Version:
1.0

Definition at line 94 of file perThreadRef.h.

template<typename T>
bool eq::base::PerThreadRef< T >::operator! (  )  const
Returns:
true if the thread-local storage holds a 0 pointer.
Version:
1.0
template<typename T>
bool eq::base::PerThreadRef< T >::isValid (  )  const
Returns:
true if the thread-local storage holds a non-0 pointer.
Version:
1.0

The documentation for this class was generated from the following file:
Generated on Sat Feb 6 13:08:15 2010 for Equalizer 0.9.1 by  doxygen 1.6.1