Fawkes API  Fawkes Development Version
fawkes::BoolMutexLocker Class Reference

Helper class to incorporate bool into mutex locker with RAII. More...

Public Member Functions

 BoolMutexLocker (Mutex *mutex, bool &associated_bool)
 Constructor. More...
 
 ~BoolMutexLocker (void)
 Destructor. More...
 
void unlock (void)
 Unlock mutex. More...
 
void relock (void)
 Relock mutex after unlock. More...
 

Detailed Description

Helper class to incorporate bool into mutex locker with RAII.

Definition at line 41 of file clingo_access.cpp.

Constructor & Destructor Documentation

◆ BoolMutexLocker()

fawkes::BoolMutexLocker::BoolMutexLocker ( Mutex mutex,
bool &  associated_bool 
)
inline

Constructor.

Parameters
mutexmutex to lock
associated_boolassociated bool value

Definition at line 54 of file clingo_access.cpp.

References relock(), and unlock().

◆ ~BoolMutexLocker()

fawkes::BoolMutexLocker::~BoolMutexLocker ( void  )
inline

Destructor.

Definition at line 64 of file clingo_access.cpp.

References fawkes::Mutex::unlock().

Member Function Documentation

◆ relock()

void fawkes::BoolMutexLocker::relock ( void  )
inline

◆ unlock()

void fawkes::BoolMutexLocker::unlock ( void  )
inline

Unlock mutex.

Definition at line 77 of file clingo_access.cpp.

Referenced by BoolMutexLocker().


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