OSB_LIB::RwShared< T > Class Template Reference

Collaboration diagram for OSB_LIB::RwShared< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename T>
class OSB_LIB::RwShared< T >

Protect a shared object with a RwMutex.

Remarks:
Destructor by compiler.

Definition at line 987 of file mutex.h.

Public Member Functions

Private Member Functions

Private Attributes


Constructor & Destructor Documentation

template<typename T>
OSB_LIB::RwShared< T >::RwShared ( RwMutex::Priority  p = RwMutex::prioRead  )  [inline]

Constructor with read/write priority.

Definition at line 990 of file mutex.h.

template<typename T>
OSB_LIB::RwShared< T >::RwShared ( const T &  t,
RwMutex::Priority  p = RwMutex::prioRead 
) [inline]

Constructor with shared resource and read/write priority.

Definition at line 995 of file mutex.h.

template<typename T>
OSB_LIB::RwShared< T >::RwShared ( const RwShared< T > &   )  [private]

Prevent copying: not implemented.


Member Function Documentation

template<typename T>
RwShared& OSB_LIB::RwShared< T >::operator= ( const RwShared< T > &   )  [private]

Prevent assignment: not implemented.

template<typename T>
const T& OSB_LIB::RwShared< T >::readLock (  )  [inline]

Get a read lock for the shared resource.

Definition at line 1001 of file mutex.h.

References OSB_LIB::RwShared< T >::mutex_, OSB_LIB::RwMutex::readLock(), and OSB_LIB::RwShared< T >::shared_.

Referenced by OSB_LIB::RwShared< T * >::readLock().

template<typename T>
void OSB_LIB::RwShared< T >::readUnlock (  )  [inline]

Remove a read lock.

Definition at line 1029 of file mutex.h.

References OSB_LIB::RwShared< T >::mutex_, and OSB_LIB::RwMutex::readUnlock().

Referenced by OSB_LIB::RwShared< T * >::readUnlock().

template<typename T>
const T& OSB_LIB::RwShared< T >::tryReadLock (  )  throw (OsbException) [inline]

Try a read lock for the shared resource.

Definition at line 1008 of file mutex.h.

References OSB_LIB::RwShared< T >::mutex_, OSB_LIB::RwShared< T >::shared_, and OSB_LIB::RwMutex::tryReadLock().

template<typename T>
T& OSB_LIB::RwShared< T >::tryWriteLock (  )  throw (OsbException) [inline]

Try a write lock for the shared resource.

Definition at line 1022 of file mutex.h.

References OSB_LIB::RwShared< T >::mutex_, OSB_LIB::RwShared< T >::shared_, and OSB_LIB::RwMutex::tryWriteLock().

template<typename T>
T& OSB_LIB::RwShared< T >::writeLock (  )  [inline]

Get a write lock for the shared resource.

Definition at line 1015 of file mutex.h.

References OSB_LIB::RwShared< T >::mutex_, OSB_LIB::RwShared< T >::shared_, and OSB_LIB::RwMutex::writeLock().

Referenced by OSB_LIB::RwShared< T * >::writeLock().

template<typename T>
void OSB_LIB::RwShared< T >::writeUnlock (  )  [inline]

Remove a write lock.

Definition at line 1035 of file mutex.h.

References OSB_LIB::RwShared< T >::mutex_, and OSB_LIB::RwMutex::writeUnlock().


Member Data Documentation

template<typename T>
RwMutex OSB_LIB::RwShared< T >::mutex_ [private]

Read/write lock protecting the resource.

Definition at line 1049 of file mutex.h.

Referenced by OSB_LIB::RwShared< T >::readLock(), OSB_LIB::RwShared< T >::readUnlock(), OSB_LIB::RwShared< T >::tryReadLock(), OSB_LIB::RwShared< T >::tryWriteLock(), OSB_LIB::RwShared< T >::writeLock(), and OSB_LIB::RwShared< T >::writeUnlock().

template<typename T>
T OSB_LIB::RwShared< T >::shared_ [private]

The shared resource.

Definition at line 1047 of file mutex.h.

Referenced by OSB_LIB::RwShared< T >::readLock(), OSB_LIB::RwShared< T >::tryReadLock(), OSB_LIB::RwShared< T >::tryWriteLock(), and OSB_LIB::RwShared< T >::writeLock().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:11:40 2006 for OSB Library by  doxygen 1.4.7