DART
6.7.3
|
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. More... | |
Private Attributes | |
std::weak_ptr< const void > | mLockableHolder |
Weak pointer to the lockable holder. More... | |
Lockable & | mLockable |
Lockable this class references. More... | |
This class references a single lockable.
LockableT | The standard C++ Lockable concept object type. |
using dart::common::SingleLockableReference< LockableT >::Lockable = LockableT |
|
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. |
|
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.
|
overridevirtualnoexcept |
Unlocks the lockables.
Implements dart::common::LockableReference.
|
private |
Lockable this class references.
|
private |
Weak pointer to the lockable holder.