Public Member Functions

CxUtils::Mutex::CScopedPtr< T > Class Template Reference

Equivalent of the ScopedPtr class, but for constant data. More...

#include <mutex.h>

List of all members.

Public Member Functions

 CScopedPtr (const T *data, const Mutex *mutex, const bool forceUnlock=false)
 Constructor for creation of a CScopedPtr.
virtual ~CScopedPtr ()
const T * operator-> () const
const T * Data () const
bool IsLocked () const
bool IsValid () const
bool operator== (const T *x) const
bool operator!= (const T *x) const

Detailed Description

template<class T>
class CxUtils::Mutex::CScopedPtr< T >

Equivalent of the ScopedPtr class, but for constant data.

Definition at line 217 of file mutex.h.


Constructor & Destructor Documentation

template<class T >
CxUtils::Mutex::CScopedPtr< T >::CScopedPtr ( const T *  data,
const Mutex mutex,
const bool  forceUnlock = false 
) [inline]

Constructor for creation of a CScopedPtr.

Parameters:
[in]dataPointer to data to be protected by a mutex until program exits the scope this structure was created in.
[in]mutexPointer to the mutex to use within the current program scope.
[in]forceUnlockIf true (default is false) then when the object goes out of scope, the mutex is unlocked always.

Definition at line 231 of file mutex.h.

template<class T >
virtual CxUtils::Mutex::CScopedPtr< T >::~CScopedPtr (  ) [inline, virtual]

Definition at line 252 of file mutex.h.


Member Function Documentation

template<class T >
const T* CxUtils::Mutex::CScopedPtr< T >::Data (  ) const [inline]

Definition at line 270 of file mutex.h.

template<class T >
bool CxUtils::Mutex::CScopedPtr< T >::IsLocked (  ) const [inline]

Definition at line 287 of file mutex.h.

template<class T >
bool CxUtils::Mutex::CScopedPtr< T >::IsValid (  ) const [inline]

Definition at line 296 of file mutex.h.

template<class T >
bool CxUtils::Mutex::CScopedPtr< T >::operator!= ( const T *  x ) const [inline]

Definition at line 308 of file mutex.h.

template<class T >
const T* CxUtils::Mutex::CScopedPtr< T >::operator-> (  ) const [inline]

Definition at line 268 of file mutex.h.

template<class T >
bool CxUtils::Mutex::CScopedPtr< T >::operator== ( const T *  x ) const [inline]

Definition at line 304 of file mutex.h.


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