SourcePro C++ 13.0 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
A guard class that releases its resource upon creation and acquires read access to its resource upon destruction. More...
#include <rw/sync/RWTWriteUnlockGuard.h>
Public Member Functions | |
RWTWriteUnlockGuard (Resource &resource) | |
~RWTWriteUnlockGuard () | |
Public Member Functions inherited from RWTWriteGuardBase< Resource > | |
~RWTWriteGuardBase () | |
void | acquire () |
bool | isAcquired () const |
void | release () |
Private Member Functions | |
RWTWriteUnlockGuard (const RWTWriteUnlockGuard< Resource > &second) | |
RWTWriteUnlockGuard< Resource > & | operator= (const RWTWriteUnlockGuard< Resource > &second) |
Additional Inherited Members | |
Protected Member Functions inherited from RWTWriteGuardBase< Resource > | |
RWTWriteGuardBase (Resource &resource) | |
RWTWriteGuardBase (Resource &resource, bool acquired) | |
Resource & | resource () const |
RWTWriteUnlockGuard<Resource> is a guard class that releases its resource upon creation and acquires write access on its resource 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 release write access on a mutex when created and reacquire write access on that mutex when destructed.
The class used as the actual template parameter for Resource
must provide acquireWrite
() and release
() methods such as the synchronization classes in this module.
|
inline |
Releases the resource.
|
inline |
Reacquires write access on the resource.
|
private |
Copy construction prohibited.
|
private |
Assignment prohibited.
Copyright © 2014 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.