|
DART 6.12.2
|
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. | |
| virtual | ~LockableReference ()=default |
| Default destructor. | |
| virtual void | lock ()=0 |
| Locks lockable that this class references; blocks if one of the lockables are not avaliable. | |
| 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. | |
| virtual void | unlock () noexcept=0 |
| Unlocks the lockables. | |
Protected Member Functions | |
| LockableReference (const LockableReference &)=delete | |
| Copy construction is not allowed. | |
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::SingleLockableReference< LockableT >, and dart::common::MultiLockableReference< 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::SingleLockableReference< LockableT >, and dart::common::MultiLockableReference< LockableT >.
|
pure virtualnoexcept |
Unlocks the lockables.
Implemented in dart::common::SingleLockableReference< LockableT >, and dart::common::MultiLockableReference< LockableT >.