PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PSafeLockReadOnly Class Reference

Lock a PSafeObject for read only and automatically unlock it when go out of scope. More...

#include <safecoll.h>

Collaboration diagram for PSafeLockReadOnly:

Public Member Functions

 PSafeLockReadOnly (const PSafeObject &object)
 
 ~PSafeLockReadOnly ()
 
PBoolean Lock ()
 
void Unlock ()
 
PBoolean IsLocked () const
 
bool operator! () const
 

Protected Attributes

PSafeObjectsafeObject
 
PBoolean locked
 

Detailed Description

Lock a PSafeObject for read only and automatically unlock it when go out of scope.

Constructor & Destructor Documentation

PSafeLockReadOnly::PSafeLockReadOnly ( const PSafeObject object)
PSafeLockReadOnly::~PSafeLockReadOnly ( )

Member Function Documentation

PBoolean PSafeLockReadOnly::IsLocked ( ) const
inline

References locked.

PBoolean PSafeLockReadOnly::Lock ( )
bool PSafeLockReadOnly::operator! ( ) const
inline

References locked.

void PSafeLockReadOnly::Unlock ( )

Member Data Documentation

PBoolean PSafeLockReadOnly::locked
protected

Referenced by IsLocked(), and operator!().

PSafeObject& PSafeLockReadOnly::safeObject
protected

The documentation for this class was generated from the following file: