STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
stdext::threads::_Scoped_try_lock_imp< _Mutex > Class Template Reference

Public Types

typedef _Mutex _My_mtx
 
typedef _Scoped_try_lock_imp< _My_mtx_Myt
 
typedef _Lock_base< _Mutex > _My_base
 

Public Member Functions

 _Scoped_try_lock_imp (_My_mtx &_Mx)
 
 _Scoped_try_lock_imp (_My_mtx &_Mx, bool _Lck)
 
 operator const void * () const
 
bool locked () const
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 

Private Member Functions

 _Scoped_try_lock_imp (const _Myt &)
 
_Mytoperator= (const _Myt &)
 

Private Attributes

_Lock_base< _Mutex > _My_lock
 

Friends

class condition
 

Member Typedef Documentation

template<class _Mutex >
typedef _Lock_base<_Mutex> stdext::threads::_Scoped_try_lock_imp< _Mutex >::_My_base
template<class _Mutex >
typedef _Mutex stdext::threads::_Scoped_try_lock_imp< _Mutex >::_My_mtx
template<class _Mutex >
typedef _Scoped_try_lock_imp<_My_mtx> stdext::threads::_Scoped_try_lock_imp< _Mutex >::_Myt

Constructor & Destructor Documentation

template<class _Mutex >
stdext::threads::_Scoped_try_lock_imp< _Mutex >::_Scoped_try_lock_imp ( _My_mtx _Mx)
inline
156  : _My_lock(_Mx)
157  { // construct locked
158  try_lock();
159  }
bool try_lock()
Definition: xmutex:183
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195
template<class _Mutex >
stdext::threads::_Scoped_try_lock_imp< _Mutex >::_Scoped_try_lock_imp ( _My_mtx _Mx,
bool  _Lck 
)
inline
162  : _My_lock(_Mx)
163  { // construct locked conditionally
164  if (_Lck)
165  lock();
166  }
void lock()
Definition: xmutex:178
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195
template<class _Mutex >
stdext::threads::_Scoped_try_lock_imp< _Mutex >::_Scoped_try_lock_imp ( const _Myt )
private

Member Function Documentation

template<class _Mutex >
void stdext::threads::_Scoped_try_lock_imp< _Mutex >::lock ( )
inline
179  { // lock it
180  _My_lock.lock();
181  }
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195
template<class _Mutex >
bool stdext::threads::_Scoped_try_lock_imp< _Mutex >::locked ( ) const
inline
174  { // test if locked
175  return (_My_lock.locked());
176  }
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195
template<class _Mutex >
stdext::threads::_Scoped_try_lock_imp< _Mutex >::operator const void * ( ) const
inline
169  { // test if locked
170  return (_My_lock);
171  }
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195
template<class _Mutex >
_Myt& stdext::threads::_Scoped_try_lock_imp< _Mutex >::operator= ( const _Myt )
private
template<class _Mutex >
bool stdext::threads::_Scoped_try_lock_imp< _Mutex >::try_lock ( )
inline
184  { // try the lock
185  return (_My_lock.try_lock());
186  }
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195
template<class _Mutex >
void stdext::threads::_Scoped_try_lock_imp< _Mutex >::unlock ( )
inline
189  { // unlock it
190  _My_lock.unlock();
191  }
_Lock_base< _Mutex > _My_lock
Definition: xmutex:195

Friends And Related Function Documentation

template<class _Mutex >
friend class condition
friend

Member Data Documentation

template<class _Mutex >
_Lock_base<_Mutex> stdext::threads::_Scoped_try_lock_imp< _Mutex >::_My_lock
private

The documentation for this class was generated from the following file: