PTLib
Version 2.14.3
|
Lock a PSafeObject for read/write and automatically unlock it when go out of scope. More...
#include <safecoll.h>
Public Member Functions | |
PSafeLockReadWrite (const PSafeObject &object) | |
~PSafeLockReadWrite () | |
PBoolean | Lock () |
void | Unlock () |
PBoolean | IsLocked () const |
bool | operator! () const |
Protected Attributes | |
PSafeObject & | safeObject |
PBoolean | locked |
Lock a PSafeObject for read/write and automatically unlock it when go out of scope.
PSafeLockReadWrite::PSafeLockReadWrite | ( | const PSafeObject & | object | ) |
PSafeLockReadWrite::~PSafeLockReadWrite | ( | ) |
PBoolean PSafeLockReadWrite::Lock | ( | ) |
|
inline |
References locked.
void PSafeLockReadWrite::Unlock | ( | ) |
|
protected |
Referenced by IsLocked(), and operator!().
|
protected |