Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LOW_objectSynchronizer::__synchronizeMethodRead Class Reference

Read locking class to ensure exclusive access. More...

#include <LOW_objectSynchronizer.h>

Collaboration diagram for LOW_objectSynchronizer::__synchronizeMethodRead:

Collaboration graph
[legend]
List of all members.

Public Methods

 __synchronizeMethodRead (const LOW_objectSynchronizer &inObjectSynchronizer, std::string inFile, int inLine)
 Obtain the read lock. More...

 ~__synchronizeMethodRead ()
 Release the lock. More...


Private Attributes

const LOW_objectSynchronizerobjectSynchronizer
 Reference to the object to lock on. More...


Detailed Description

Read locking class to ensure exclusive access.

The class is intended to be used in a "locking is creation" design pattern. On creation a read lock on a rwlock is optained, and on destruction the rwlock is released.

Definition at line 337 of file LOW_objectSynchronizer.h.


Constructor & Destructor Documentation

LOW_objectSynchronizer::__synchronizeMethodRead::__synchronizeMethodRead const LOW_objectSynchronizer   inObjectSynchronizer,
std::string    inFile,
int    inLine
[inline]
 

Obtain the read lock.

Inlined for performance reasons.

Parameters:
inObjectSynchronizer  Reference to the object to synchronize on.

Definition at line 345 of file LOW_objectSynchronizer.h.

References __synchronizeMethodRead(), LOW_thread_rwlock::lockRead(), objectSynchronizer, LOW_objectSynchronizer::objectSyncRwlock, LOW_helper_msglog::objSync_getLock_dl, LOW_helper_msglog::objSync_lockFailed_dl, LOW_helper_msglog::printDebug(), and LOW_thread_rwlock::tryLockRead().

Referenced by __synchronizeMethodRead().

LOW_objectSynchronizer::__synchronizeMethodRead::~__synchronizeMethodRead   [inline]
 

Release the lock.

Inlined for performance reasons.

Definition at line 370 of file LOW_objectSynchronizer.h.

References objectSynchronizer, LOW_objectSynchronizer::objectSyncRwlock, and LOW_thread_rwlock::unlock().


Member Data Documentation

const LOW_objectSynchronizer& LOW_objectSynchronizer::__synchronizeMethodRead::objectSynchronizer [private]
 

Reference to the object to lock on.

Definition at line 376 of file LOW_objectSynchronizer.h.

Referenced by __synchronizeMethodRead(), and ~__synchronizeMethodRead().


The documentation for this class was generated from the following file:
Generated on Mon Nov 10 10:32:50 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001