libcopp  2.2.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes
util::lock::lock_holder< TLock, TLockAct, TUnlockAct > Class Template Reference

#include <lock_holder.h>

Collaboration diagram for util::lock::lock_holder< TLock, TLockAct, TUnlockAct >:
Collaboration graph

Public Types

using value_type = TLock
 

Public Member Functions

 lock_holder (lock_holder &&other)
 
lock_holderoperator= (lock_holder &&other) noexcept
 
 lock_holder (TLock &lock)
 
 ~lock_holder ()
 
bool is_available () const noexcept
 
void reset () noexcept
 

Private Member Functions

 lock_holder (const lock_holder &)=delete
 
lock_holderoperator= (const lock_holder &)=delete
 

Private Attributes

value_typelock_flag_
 

Detailed Description

template<typename TLock, typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
class util::lock::lock_holder< TLock, TLockAct, TUnlockAct >

Definition at line 83 of file lock_holder.h.

Member Typedef Documentation

◆ value_type

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
using util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::value_type = TLock

Definition at line 85 of file lock_holder.h.

Constructor & Destructor Documentation

◆ lock_holder() [1/3]

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::lock_holder ( lock_holder< TLock, TLockAct, TUnlockAct > &&  other)
inline

Definition at line 87 of file lock_holder.h.

◆ lock_holder() [2/3]

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::lock_holder ( TLock &  lock)
inline

Definition at line 102 of file lock_holder.h.

◆ ~lock_holder()

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::~lock_holder ( )
inline

Definition at line 108 of file lock_holder.h.

◆ lock_holder() [3/3]

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::lock_holder ( const lock_holder< TLock, TLockAct, TUnlockAct > &  )
privatedelete

Member Function Documentation

◆ is_available()

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
bool util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::is_available ( ) const
inlinenoexcept

Definition at line 114 of file lock_holder.h.

◆ operator=() [1/2]

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
lock_holder& util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::operator= ( const lock_holder< TLock, TLockAct, TUnlockAct > &  )
privatedelete

◆ operator=() [2/2]

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
lock_holder& util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::operator= ( lock_holder< TLock, TLockAct, TUnlockAct > &&  other)
inlinenoexcept

Definition at line 89 of file lock_holder.h.

◆ reset()

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
void util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::reset ( )
inlinenoexcept

Definition at line 116 of file lock_holder.h.

Field Documentation

◆ lock_flag_

template<typename TLock , typename TLockAct = detail::default_lock_action<TLock>, typename TUnlockAct = detail::default_unlock_action<TLock>>
value_type* util::lock::lock_holder< TLock, TLockAct, TUnlockAct >::lock_flag_
private

Definition at line 129 of file lock_holder.h.


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