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

#include <evo/lock.h>

Detailed Description

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

Smart read-locking for synchronization.

Template Parameters
TRead/Write synchronization type to use – ex: MutexRW

Public Member Functions

 SmartLockRead (T &object, bool lock=true)
 Constructor. More...
 
 ~SmartLockRead ()
 Destructor, unlocks if locked here. More...
 
SmartLockReadlock ()
 Read-Lock object, if not already locked by this. More...
 
SmartLockReadunlock ()
 Read-Unlock object, if locked by this. More...
 

Public Attributes

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

Protected Attributes

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

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