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 reference pointer.
 ~PerThreadRef ()
 Destruct a per-thread reference pointer.
PerThreadRef< T > & operator= (RefPtr< T > data)
 Assign a reference pointer to the thread-local storage.
PerThreadRef< T > & operator= (const PerThreadRef< T > &rhs)
 Assign a reference pointer to the thread-local storage.
RefPtr< const T > get () const
RefPtr< T > get ()
T * getPointer ()
T * operator-> ()
 Access the object held by the RefPtr in the thread-local storage.
const T * operator-> () const
 Access the object held by the RefPtr in the thread-local storage.
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.

Definition at line 32 of file perThreadRef.h.


Constructor & Destructor Documentation

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

Construct a new per-thread reference pointer.

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

Destruct a per-thread reference pointer.


Member Function Documentation

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

Assign a reference pointer to the thread-local storage.

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

Assign a reference pointer to the thread-local storage.

template<typename T>
RefPtr< const T > eq::base::PerThreadRef< T >::get (  )  const

Returns:
the reference pointer from the thread-local storage.

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 reference pointer from the thread-local storage.

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

Returns:
the C pointer of the RefPtr from the thread-local storage.

template<typename T>
T* eq::base::PerThreadRef< T >::operator-> (  ) 

Access the object held by the RefPtr in the thread-local storage.

template<typename T>
const T* eq::base::PerThreadRef< T >::operator-> (  )  const

Access the object held by the RefPtr in the thread-local storage.

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.

Definition at line 58 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.

Definition at line 61 of file perThreadRef.h.

template<typename T>
bool eq::base::PerThreadRef< T >::operator!= ( const RefPtr< T > &  rhs  )  const [inline]

Returns:
false if the two objects hold the same C pointer.

Definition at line 64 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.

template<typename T>
bool eq::base::PerThreadRef< T >::isValid (  )  const

Returns:
true if the thread-local storage holds a non-0 pointer.


The documentation for this class was generated from the following file:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8