externally_locked cloaks an object of type T, and actually provides full access to that object through the get and set member functions, provided you pass a reference to a strict lock object More...
#include <externally_locked.hpp>
Public Types | |
typedef MutexType | mutex_type |
Public Member Functions | |
externally_locked (mutex_type &mtx, const T &obj) | |
Requires: T is a model of CopyConstructible. More... | |
externally_locked (mutex_type &mtx, BOOST_THREAD_RV_REF(T) obj) | |
Requires: T is a model of Movable. More... | |
externally_locked (mutex_type &mtx) | |
Requires: T is a model of DefaultConstructible. More... | |
externally_locked (externally_locked const &rhs) | |
Copy constructor. More... | |
externally_locked (BOOST_THREAD_RV_REF(externally_locked) rhs) | |
Move constructor. More... | |
externally_locked & | operator= (externally_locked const &rhs) |
assignment More... | |
externally_locked & | operator= (BOOST_THREAD_RV_REF(externally_locked) rhs) |
move assignment More... | |
void | swap (externally_locked &rhs) |
T & | get (strict_lock< mutex_type > &lk) |
Requires: The lk parameter must be locking the associated mtx. More... | |
const T & | get (strict_lock< mutex_type > &lk) const |
template<class Lock > | |
T & | get (nested_strict_lock< Lock > &lk) |
template<class Lock > | |
const T & | get (nested_strict_lock< Lock > &lk) const |
template<class Lock > | |
T & | get (Lock &lk) |
Requires: The lk parameter must be locking the associated mtx. More... | |
mutex_type * | mutex () const BOOST_NOEXCEPT |
void | lock () |
void | unlock () |
bool | try_lock () |
externally_locked cloaks an object of type T, and actually provides full access to that object through the get and set member functions, provided you pass a reference to a strict lock object
typedef MutexType boost::externally_locked< T, MutexType >::mutex_type |
|
inline |
Requires: T is a model of CopyConstructible.
Effects: Constructs an externally locked object copying the cloaked type.
|
inline |
Requires: T is a model of Movable.
Effects: Constructs an externally locked object by moving the cloaked type.
|
inline |
Requires: T is a model of DefaultConstructible.
Effects: Constructs an externally locked object initializing the cloaked type with the default constructor.
|
inline |
Copy constructor.
|
inline |
Move constructor.
|
inline |
Requires: The lk parameter must be locking the associated mtx.
Returns: The address of the cloaked object..
Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
|
inline |
|
inline |
|
inline |
|
inline |
Requires: The lk parameter must be locking the associated mtx.
Returns: The address of the cloaked object..
Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
|
inline |
|
inline |
|
inline |
assignment
|
inline |
move assignment
|
inline |
Referenced by boost::externally_locked< Stream &, RecursiveMutex >::swap(), and boost::swap().
|
inline |
|
inline |