SourcePro C++ 13.0 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
Guard class that releases its resource upon creation and acquires it upon destruction. More...
#include <rw/sync/RWTUnlockGuard.h>
Public Member Functions | |
RWTUnlockGuard (Resource &resource) | |
~RWTUnlockGuard () | |
Public Member Functions inherited from RWTGuardBase< Resource > | |
~RWTGuardBase () | |
void | acquire () |
bool | isAcquired () const |
void | release () |
Private Member Functions | |
RWTUnlockGuard (const RWTUnlockGuard< Resource > &second) | |
RWTUnlockGuard< Resource > & | operator= (const RWTUnlockGuard< Resource > &second) |
Additional Inherited Members | |
Protected Member Functions inherited from RWTGuardBase< Resource > | |
RWTGuardBase (Resource &resource) | |
RWTGuardBase (Resource &resource, bool acquired) | |
Resource & | resource () const |
RWTUnlockGuard<Resource> is a guard class that releases its resource upon creation and acquires 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 release a mutex when created and reacquire it when destructed. The class used as the actual template parameter for Resource
must be one that provides acquire
() and release
() methods, such as the synchronization classes provided in this module.
|
inline |
Releases the resource.
|
inline |
Reacquires 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.