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 35 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 42 of file clingo_access.cpp.

References fawkes::Mutex::lock().

◆ ~BoolMutexLocker()

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

Destructor.

Definition at line 52 of file clingo_access.cpp.

References relock(), and unlock().

Member Function Documentation

◆ relock()

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

Relock mutex after unlock.

Definition at line 73 of file clingo_access.cpp.

References fawkes::Mutex::lock().

Referenced by ~BoolMutexLocker().

◆ unlock()

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

Unlock mutex.

Definition at line 65 of file clingo_access.cpp.

References fawkes::Mutex::unlock().

Referenced by ~BoolMutexLocker().


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