externally_locked<T&,M> specialization for T& that cloaks an reference to 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 (T &obj, mutex_type &mtx) BOOST_NOEXCEPT | |
Effects: Constructs an externally locked object storing the cloaked reference object. More... | |
externally_locked (externally_locked const &rhs) BOOST_NOEXCEPT | |
copy constructor More... | |
externally_locked (BOOST_THREAD_RV_REF(externally_locked) rhs) BOOST_NOEXCEPT | |
move constructor More... | |
externally_locked & | operator= (externally_locked const &rhs) BOOST_NOEXCEPT |
assignment More... | |
externally_locked & | operator= (BOOST_THREAD_RV_REF(externally_locked) rhs) BOOST_NOEXCEPT |
move assignment More... | |
void | swap (externally_locked &rhs) BOOST_NOEXCEPT |
T & | get (strict_lock< mutex_type > const &lk) |
Requires: The lk parameter must be locking the associated mtx. More... | |
const T & | get (strict_lock< mutex_type > const &lk) const |
template<class Lock > | |
T & | get (nested_strict_lock< Lock > const &lk) |
template<class Lock > | |
const T & | get (nested_strict_lock< Lock > const &lk) const |
template<class Lock > | |
T & | get (Lock const &lk) |
Requires: The lk parameter must be locking the associated mtx. More... | |
template<class Lock > | |
T const & | get (Lock const &lk) const |
Requires: The lk parameter must be locking the associated mtx. More... | |
mutex_type * | mutex () const BOOST_NOEXCEPT |
void | lock () |
void | unlock () |
bool | try_lock () |
Protected Attributes | |
T * | obj_ |
mutex_type * | mtx_ |
externally_locked<T&,M> specialization for T& that cloaks an reference to 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 |
Effects: Constructs an externally locked object storing the cloaked reference object.
|
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
References boost::interprocess::lock_error.
|
inline |
References boost::interprocess::lock_error.
|
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
References boost::BOOST_CONCEPT_ASSERT(), boost::BOOST_STATIC_ASSERT(), boost::interprocess::lock_error, and boost::program_options::value().
|
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
References boost::BOOST_CONCEPT_ASSERT(), boost::BOOST_STATIC_ASSERT(), boost::interprocess::lock_error, and boost::program_options::value().
|
inline |
|
inline |
|
inline |
assignment
|
inline |
move assignment
|
inline |
References boost::swap.
|
inline |
|
inline |
|
protected |
|
protected |