DUECA/DUSIME
Public Member Functions | List of all members
dueca::ScopeLock Class Reference

User of the StateGuard class. More...

Public Member Functions

 ScopeLock (StateGuard &guard)
 Constructor, locks the stateguard.
 
 ~ScopeLock ()
 Destructor, unlocks the guard. More...
 

Detailed Description

User of the StateGuard class.

Locks a StateGuard upon entry, and unlocks again upon deletion, i.e. as the thing goes out of scope. Example:

{
// somewhere inside a block
ScopeLock lockthis(my_state_guard);
// from now on. guard is locked. Access the data
} // as the block (function, etc.) goes out of scope, the
// ScopeLock destructor is called and guard is unlocked.

Constructor & Destructor Documentation

◆ ~ScopeLock()

dueca::ScopeLock::~ScopeLock ( )
inline

Destructor, unlocks the guard.


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