NCBI C++ ToolKit
Classes | Public Member Functions | Protected Attributes | Private Attributes | List of all members
SThreadSafe< TType > Struct Template Reference

Search Toolkit Book for SThreadSafe

#include <connect/impl/connect_misc.hpp>

+ Inheritance diagram for SThreadSafe< TType >:

Classes

struct  SLock
 

Public Member Functions

template<class... TArgs>
 SThreadSafe (TArgs &&... args)
 
SLock< TType > GetLock ()
 
SLock< const TType > GetLock () const
 
volatile TType * operator-> ()
 
const volatile TType * operator-> () const
 
volatile TType & GetMTSafe ()
 
const volatile TType & GetMTSafe () const
 

Protected Attributes

mutex m_Mutex
 

Private Attributes

TType m_Object
 

Detailed Description

template<class TType>
struct SThreadSafe< TType >

Definition at line 114 of file connect_misc.hpp.

Constructor & Destructor Documentation

◆ SThreadSafe()

template<class TType >
template<class... TArgs>
SThreadSafe< TType >::SThreadSafe ( TArgs &&...  args)
inline

Definition at line 137 of file connect_misc.hpp.

Member Function Documentation

◆ GetLock() [1/2]

template<class TType >
SLock< TType> SThreadSafe< TType >::GetLock ( )
inline

◆ GetLock() [2/2]

template<class TType >
SLock<const TType> SThreadSafe< TType >::GetLock ( ) const
inline

Definition at line 140 of file connect_misc.hpp.

◆ GetMTSafe() [1/2]

template<class TType >
volatile TType& SThreadSafe< TType >::GetMTSafe ( )
inline

Definition at line 146 of file connect_misc.hpp.

◆ GetMTSafe() [2/2]

template<class TType >
const volatile TType& SThreadSafe< TType >::GetMTSafe ( ) const
inline

Definition at line 147 of file connect_misc.hpp.

◆ operator->() [1/2]

template<class TType >
volatile TType* SThreadSafe< TType >::operator-> ( void  )
inline

Definition at line 144 of file connect_misc.hpp.

◆ operator->() [2/2]

template<class TType >
const volatile TType* SThreadSafe< TType >::operator-> ( void  ) const
inline

Definition at line 145 of file connect_misc.hpp.

Member Data Documentation

◆ m_Mutex

template<class TType >
mutex SThreadSafe< TType >::m_Mutex
mutableprotected

Definition at line 150 of file connect_misc.hpp.

Referenced by SThreadSafe< SPSG_Servers >::GetLock().

◆ m_Object

template<class TType >
TType SThreadSafe< TType >::m_Object
private

The documentation for this struct was generated from the following file:
Modified on Tue Apr 23 07:39:58 2024 by modify_doxy.py rev. 669887