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 40 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 52 of file clingo_access.cpp.

References relock(), and unlock().

◆ ~BoolMutexLocker()

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

Destructor.

Definition at line 62 of file clingo_access.cpp.

References fawkes::Mutex::unlock().

Member Function Documentation

◆ relock()

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

Relock mutex after unlock.

Definition at line 83 of file clingo_access.cpp.

Referenced by BoolMutexLocker().

◆ unlock()

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

Unlock mutex.

Definition at line 75 of file clingo_access.cpp.

Referenced by BoolMutexLocker().


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