libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::lock::scope_lock< LockObject > Class Template Reference

#include <locking.hpp>

Inheritance diagram for jmmcg::ppd::lock::scope_lock< LockObject >:
[legend]
Collaboration diagram for jmmcg::ppd::lock::scope_lock< LockObject >:
[legend]

Public Types

typedef lockable< typename LockObject::lock_traits > base_t
 
typedef LockObject atomic_t
 
typedef atomic_t::lock_traits lock_traits
 
typedef lock_traits::atomic_state_type atomic_state_type
 
typedef lock_traits::timeout_type timeout_type
 
typedef atomic_state_type lock_result_type
 
- Public Types inherited from jmmcg::ppd::lock::lockable< LockObject::lock_traits >
using lock_traits = LockObject::lock_traits
 
typedef lock_traits::atomic_state_type atomic_state_type
 
typedef lock_traits::timeout_type timeout_type
 

Static Public Attributes

static constexpr generic_traits::memory_access_modes memory_access_mode =atomic_t::memory_access_mode
 

Protected Member Functions

__stdcall scope_lock (atomic_t &lo) noexcept(true) FORCE_INLINE
 
__stdcall scope_lock (atomic_t &lo, const typename atomic_t::timeout_type period) noexcept(true) FORCE_INLINE
 
 scope_lock (scope_lock const &)=delete
 
virtual __stdcall ~scope_lock () noexcept(true) FORCE_INLINE
 
lock_result_type __fastcall try_lock () noexcept(true) override FORCE_INLINE
 
lock_result_type __fastcall lock () noexcept(false) override FORCE_INLINE
 
lock_result_type __fastcall lock (const timeout_type period) noexcept(false) override FORCE_INLINE
 
lock_result_type __fastcall unlock () noexcept(true) override FORCE_INLINE
 
void decay () noexcept(true) FORCE_INLINE
 

Protected Attributes

atomic_tlocker
 

Additional Inherited Members

Detailed Description

template<class LockObject>
class jmmcg::ppd::lock::scope_lock< LockObject >

Definition at line 138 of file locking.hpp.

Member Typedef Documentation

◆ atomic_state_type

template<class LockObject>
typedef lock_traits::atomic_state_type jmmcg::ppd::lock::scope_lock< LockObject >::atomic_state_type

Definition at line 143 of file locking.hpp.

◆ atomic_t

template<class LockObject>
typedef LockObject jmmcg::ppd::lock::scope_lock< LockObject >::atomic_t

Definition at line 141 of file locking.hpp.

◆ base_t

template<class LockObject>
typedef lockable<typename LockObject::lock_traits> jmmcg::ppd::lock::scope_lock< LockObject >::base_t

Definition at line 140 of file locking.hpp.

◆ lock_result_type

template<class LockObject>
typedef atomic_state_type jmmcg::ppd::lock::scope_lock< LockObject >::lock_result_type

Definition at line 145 of file locking.hpp.

◆ lock_traits

template<class LockObject>
typedef atomic_t::lock_traits jmmcg::ppd::lock::scope_lock< LockObject >::lock_traits

Definition at line 142 of file locking.hpp.

◆ timeout_type

template<class LockObject>
typedef lock_traits::timeout_type jmmcg::ppd::lock::scope_lock< LockObject >::timeout_type

Definition at line 144 of file locking.hpp.

Constructor & Destructor Documentation

◆ scope_lock() [1/3]

template<class LockObject >
jmmcg::ppd::lock::scope_lock< LockObject >::scope_lock ( atomic_t lo)
inlineexplicitprotectednoexcept

Definition at line 102 of file locking_impl.hpp.

◆ scope_lock() [2/3]

template<class LockObject >
jmmcg::ppd::lock::scope_lock< LockObject >::scope_lock ( atomic_t lo,
const typename atomic_t::timeout_type  period 
)
inlineprotectednoexcept

Definition at line 131 of file locking_impl.hpp.

◆ scope_lock() [3/3]

template<class LockObject>
jmmcg::ppd::lock::scope_lock< LockObject >::scope_lock ( scope_lock< LockObject > const &  )
protecteddelete

◆ ~scope_lock()

template<class LockObject >
jmmcg::ppd::lock::scope_lock< LockObject >::~scope_lock ( )
inlineprotectedvirtualnoexcept

Definition at line 138 of file locking_impl.hpp.

Member Function Documentation

◆ decay()

template<class LockObject >
void jmmcg::ppd::lock::scope_lock< LockObject >::decay ( )
inlineprotectednoexcept

Definition at line 143 of file locking_impl.hpp.

◆ lock() [1/2]

template<class LockObject >
scope_lock< LockObject >::atomic_state_type jmmcg::ppd::lock::scope_lock< LockObject >::lock ( )
inlineoverrideprotectedvirtualnoexcept

◆ lock() [2/2]

template<class LockObject >
scope_lock< LockObject >::atomic_state_type jmmcg::ppd::lock::scope_lock< LockObject >::lock ( const timeout_type  period)
inlineoverrideprotectedvirtualnoexcept

◆ try_lock()

template<class LockObject >
scope_lock< LockObject >::atomic_state_type jmmcg::ppd::lock::scope_lock< LockObject >::try_lock ( )
inlineoverrideprotectedvirtualnoexcept

◆ unlock()

template<class LockObject >
scope_lock< LockObject >::atomic_state_type jmmcg::ppd::lock::scope_lock< LockObject >::unlock ( )
inlineoverrideprotectedvirtualnoexcept

Member Data Documentation

◆ locker

template<class LockObject>
atomic_t& jmmcg::ppd::lock::scope_lock< LockObject >::locker
protected

Definition at line 166 of file locking.hpp.

◆ memory_access_mode

template<class LockObject>
constexpr generic_traits::memory_access_modes jmmcg::ppd::lock::scope_lock< LockObject >::memory_access_mode =atomic_t::memory_access_mode
staticconstexpr

To assist in allowing compile-time computation of the algorithmic order of the threading model.

Definition at line 150 of file locking.hpp.


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