Evo C++ Library v0.5.1
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SmartLock< T > Struct Template Reference

#include <evo/lock.h>

Detailed Description

template<class T>
struct evo::SmartLock< T >

Smart locking for synchronization.

Template Parameters
TSynchronization type to use – ex: Mutex, Condition

Public Member Functions

 SmartLock (T &object, bool lock=true)
 Constructor. More...
 
 ~SmartLock ()
 Destructor, unlocks if locked here. More...
 
SmartLocklock ()
 Lock object, if not already locked by this. More...
 
SmartLockunlock ()
 Unlock object, if locked by this. More...
 

Public Attributes

T & object_
 Synchronization object to lock. More...
 

Protected Attributes

bool locked_
 Whether object is locked by this. More...
 

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