dart
|
This class references a single lockable. More...
#include <LockableReference.hpp>
Public Types | |
using | Lockable = LockableT |
Public Member Functions | |
SingleLockableReference (std::weak_ptr< const void > lockableHolder, Lockable &lockable) noexcept | |
Constructor from a single lockable. More... | |
void | lock () override |
Locks lockable that this class references; blocks if one of the lockables are not avaliable. More... | |
bool | try_lock () noexcept override |
Tries to lock the lockables that this class references; returns false if one of the lockables is not avaliable. More... | |
void | unlock () noexcept override |
Unlocks the lockables. | |
![]() | |
constexpr | LockableReference () noexcept=default |
Default construtor. | |
virtual | ~LockableReference ()=default |
Default destructor. | |
Additional Inherited Members | |
![]() | |
LockableReference (const LockableReference &)=delete | |
Copy construction is not allowed. | |
This class references a single lockable.
LockableT | The standard C++ Lockable concept object type. |
|
noexcept |
Constructor from a single lockable.
[in] | lockableHolder | Weak pointer to an object that holds the lockable. This is used to check whether the lockable holder is not destructed before lock/unlock. |
[in] | lockable |
|
overridevirtual |
Locks lockable that this class references; blocks if one of the lockables are not avaliable.
Implements dart::common::LockableReference.
|
overridevirtualnoexcept |
Tries to lock the lockables that this class references; returns false if one of the lockables is not avaliable.
Implements dart::common::LockableReference.