The C++ framework for developing highly scalable, high performance servers on Windows platforms.

TLockableObjectPotentialOwner Class Template Reference
[Win32 Synchronization primitivesRAII - Resource Acquisition Is Initialization]

Collaboration diagram for TLockableObjectPotentialOwner:

List of all members.

Detailed Description

template<typename T>
class JetByteTools::Core::TLockableObjectPotentialOwner< T >

A class that could take ownership of an instance of a lockable object. If you call Lock() or TryLock() on this class it will keep track of the fact that the lockable object has been locked and will call Unlock() in the destructor. This can therefore be used to support scope based locking and unlocking of instances of the object.

Public Member Functions

 TLockableObjectPotentialOwner (T &lock, const bool locked=false)
 TLockableObjectPotentialOwner (const TLockableObjectPotentialOwner &rhs)
 ~TLockableObjectPotentialOwner ()
TLockableObjectPotentialOwneroperator= (const TLockableObjectPotentialOwner &rhs)
void Lock ()
bool TryLock ()
void Unlock ()

Constructor & Destructor Documentation

TLockableObjectPotentialOwner ( T &  lock,
const bool  locked = false 
) [inline, explicit]

~TLockableObjectPotentialOwner (  )  [inline]

Member Function Documentation

TLockableObjectPotentialOwner& operator= ( const TLockableObjectPotentialOwner< T > &  rhs  ) 

void Lock (  )  [inline]

bool TryLock (  )  [inline]

void Unlock (  )  [inline]

Generated on Sun Sep 12 19:08:41 2021 for The Server Framework - v7.4 by doxygen 1.5.3