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

#include <safecoll.h>

Inheritance diagram for PSafeLockBase:
Collaboration diagram for PSafeLockBase:

Public Member Functions

 ~PSafeLockBase ()
 
bool Lock ()
 
void Unlock ()
 
bool IsLocked () const
 
bool operator! () const
 

Protected Types

typedef bool(PSafeObject::* LockFn )(const PDebugLocation *location) const
 
typedef void(PSafeObject::* UnlockFn )(const PDebugLocation *location) const
 

Protected Member Functions

 PSafeLockBase (const PSafeObject &object, const PDebugLocation *location, LockFn lock, UnlockFn unlock)
 

Protected Attributes

PSafeObjectm_safeObject
 
PDebugLocation m_location
 
LockFn m_lock
 
UnlockFn m_unlock
 
bool m_locked
 

Member Typedef Documentation

typedef bool(PSafeObject:: * PSafeLockBase::LockFn)(const PDebugLocation *location) const
protected
typedef void(PSafeObject:: * PSafeLockBase::UnlockFn)(const PDebugLocation *location) const
protected

Constructor & Destructor Documentation

PSafeLockBase::PSafeLockBase ( const PSafeObject object,
const PDebugLocation location,
LockFn  lock,
UnlockFn  unlock 
)
protected
PSafeLockBase::~PSafeLockBase ( )

Member Function Documentation

bool PSafeLockBase::IsLocked ( ) const
inline

References m_locked.

bool PSafeLockBase::Lock ( )
bool PSafeLockBase::operator! ( ) const
inline

References m_locked.

void PSafeLockBase::Unlock ( )

Member Data Documentation

PDebugLocation PSafeLockBase::m_location
protected
LockFn PSafeLockBase::m_lock
protected
bool PSafeLockBase::m_locked
protected

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

PSafeObject& PSafeLockBase::m_safeObject
protected
UnlockFn PSafeLockBase::m_unlock
protected

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