SourcePro® 2023.1 |
SourcePro® API Reference Guide |
A guard class that acquires read access to its resource upon creation and releases it upon destruction. More...
#include <rw/sync/RWTReadLockGuard.h>
Public Member Functions | |
RWTReadLockGuard (Resource &resource) | |
~RWTReadLockGuard () | |
Public Member Functions inherited from RWTReadLockGuardBase< Resource > | |
~RWTReadLockGuardBase () | |
Public Member Functions inherited from RWTReadGuardBase< Resource > | |
~RWTReadGuardBase () | |
void | acquire () |
bool | isAcquired () const |
void | release () |
Private Member Functions | |
RWTReadLockGuard (const RWTReadLockGuard< Resource > &second) | |
RWTReadLockGuard< Resource > & | operator= (const RWTReadLockGuard< Resource > &second) |
Additional Inherited Members | |
Protected Member Functions inherited from RWTReadLockGuardBase< Resource > | |
RWTReadLockGuardBase (Resource &resource) | |
RWTReadLockGuardBase (Resource &resource, bool acquired) | |
Protected Member Functions inherited from RWTReadGuardBase< Resource > | |
RWTReadGuardBase (Resource &resource) | |
RWTReadGuardBase (Resource &resource, bool acquired) | |
Resource & | resource () const |
RWTReadLockGuard is a guard class that acquires read access on its resource upon creation and releases it upon destruction. Guard objects work in conjunction with block statements to establish an appropriate state upon creation, maintain that state for the duration of the block, and restore the original state upon destruction. For example, a guard may acquire read access on a mutex upon creation and release it when destructed. The class used as the template parameter Resource
must be one that provides acquireRead() and release() methods, such as the synchronization classes provided in this module.
|
inline |
Destructor.
|
inline |
Constructs an instance with the given resource and acquires read access on that resource. The resource is released in the destructor of the base class.
|
private |
Copy constructor prohibited.
|
private |
Assignment prohibited.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |