PTLib  Version 2.10.11
PSafeLockReadOnly Class Reference

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

#include <safecoll.h>

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
PBoolean PSafeLockReadOnly::Lock ( )
bool PSafeLockReadOnly::operator! ( ) const
inline
void PSafeLockReadOnly::Unlock ( )

Member Data Documentation

PBoolean PSafeLockReadOnly::locked
protected
PSafeObject& PSafeLockReadOnly::safeObject
protected

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