DART
6.10.1
|
LockableReference is a wrapper class of single or multiple Lockable object(s) to provide unified interface that guarantees deadlock-free locking and unlocking of the internal lockable(s). More...
#include <LockableReference.hpp>
Public Member Functions | |
constexpr | LockableReference () noexcept=default |
Default construtor. More... | |
virtual | ~LockableReference ()=default |
Default destructor. More... | |
virtual void | lock ()=0 |
Locks lockable that this class references; blocks if one of the lockables are not avaliable. More... | |
virtual bool | try_lock () noexcept=0 |
Tries to lock the lockables that this class references; returns false if one of the lockables is not avaliable. More... | |
virtual void | unlock () noexcept=0 |
Unlocks the lockables. More... | |
Protected Member Functions | |
LockableReference (const LockableReference &)=delete | |
Copy construction is not allowed. More... | |
LockableReference is a wrapper class of single or multiple Lockable object(s) to provide unified interface that guarantees deadlock-free locking and unlocking of the internal lockable(s).
This class is compatible to BasicLockable concept so that it can be used as a template parameter that requires BasicLockable concept such as std::lock_guard.
|
constexprdefaultnoexcept |
Default construtor.
|
virtualdefault |
Default destructor.
|
protecteddelete |
Copy construction is not allowed.
|
pure virtual |
Locks lockable that this class references; blocks if one of the lockables are not avaliable.
Implemented in dart::common::MultiLockableReference< LockableT >, and dart::common::SingleLockableReference< LockableT >.
|
pure virtualnoexcept |
Tries to lock the lockables that this class references; returns false if one of the lockables is not avaliable.
Implemented in dart::common::MultiLockableReference< LockableT >, and dart::common::SingleLockableReference< LockableT >.
|
pure virtualnoexcept |
Unlocks the lockables.
Implemented in dart::common::MultiLockableReference< LockableT >, and dart::common::SingleLockableReference< LockableT >.