Class for mutually exclusive access to objects. More...
#include <cmtkLockingPtr.h>

Public Member Functions | |
| LockingPtr (volatile T &object, volatile MutexLock &mutexLock) | |
| Create locking pointer and lock mutex. | |
| ~LockingPtr () | |
| Destroy locking pointer and unlock mutex. | |
| T & | operator* () |
| Dereferencing operator. | |
| T * | operator-> () |
| Member access operator. | |
Private Attributes | |
| T * | m_Object |
| Pointer to the accessed object. | |
| MutexLock * | m_MutexLock |
| The mutex lock. | |
Class for mutually exclusive access to objects.
This class is an adapted version of a concept by Andrei Alexandrescu of RealNetworks Inc.
Definition at line 52 of file cmtkLockingPtr.h.
| cmtk::LockingPtr< T >::LockingPtr | ( | volatile T & | object, |
| volatile MutexLock & | mutexLock | ||
| ) | [inline] |
Create locking pointer and lock mutex.
Definition at line 56 of file cmtkLockingPtr.h.
| cmtk::LockingPtr< T >::~LockingPtr | ( | ) | [inline] |
Destroy locking pointer and unlock mutex.
Definition at line 64 of file cmtkLockingPtr.h.
| T& cmtk::LockingPtr< T >::operator* | ( | ) | [inline] |
Dereferencing operator.
Definition at line 70 of file cmtkLockingPtr.h.
| T* cmtk::LockingPtr< T >::operator-> | ( | ) | [inline] |
Member access operator.
Definition at line 76 of file cmtkLockingPtr.h.
MutexLock* cmtk::LockingPtr< T >::m_MutexLock [private] |
The mutex lock.
Definition at line 86 of file cmtkLockingPtr.h.
T* cmtk::LockingPtr< T >::m_Object [private] |
Pointer to the accessed object.
Definition at line 83 of file cmtkLockingPtr.h.
1.7.2