|
DART 6.12.2
|
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. | |
| void | lock () override |
| Locks lockable that this class references; blocks if one of the lockables are not avaliable. | |
| bool | try_lock () noexcept override |
| Tries to lock the lockables that this class references; returns false if one of the lockables is not avaliable. | |
| void | unlock () noexcept override |
| Unlocks the lockables. | |
Private Attributes | |
| std::weak_ptr< const void > | mLockableHolder |
| Weak pointer to the lockable holder. | |
| Lockable & | mLockable |
| Lockable this class references. | |
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. |
| [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.
|
overridevirtualnoexcept |
Unlocks the lockables.
Implements dart::common::LockableReference.
|
private |
Lockable this class references.
|
private |
Weak pointer to the lockable holder.