| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Member Functions | Private Attributes | List of all members
LockedHandle< T, MutexType >::ConstGuard Class Reference

`#include <GaudiKernel/LockedHandle.h>`

## Public Member Functions
| ConstGuard (ConstGuard &&a)
| ConstGuard (const T *ptr, MutexType &mutex)
| ~ConstGuard ()
const T & | operator * () const
const T * | operator-> () const
| operator const T & () const

## Private Member Functions
| ConstGuard (const ConstGuard &a)=delete

## Private Attributes
const T * | m_ptr
MutexType * | m_mutex

## Detailed Description

### template<class T, class MutexType = std::mutex>
class LockedHandle< T, MutexType >::ConstGuard

Definition at line 62 of file LockedHandle.h.

## Constructor & Destructor Documentation

## ◆ ConstGuard() [1/3]

template<class T, class MutexType = std::mutex>

LockedHandle< T, MutexType >::ConstGuard::ConstGuard | ( | const ConstGuard & | a | ) |
| private delete

## ◆ ConstGuard() [2/3]

template<class T, class MutexType = std::mutex>

LockedHandle< T, MutexType >::ConstGuard::ConstGuard | ( | ConstGuard && | a | ) |
| inline

Definition at line 66 of file LockedHandle.h.

66 : m_ptr( a.m_ptr ), m_mutex( a.m_mutex ) { a.m_mutex = nullptr; }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:76
LockedHandle::ConstGuard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:77

## ◆ ConstGuard() [3/3]

template<class T, class MutexType = std::mutex>

LockedHandle< T, MutexType >::ConstGuard::ConstGuard | ( | const T * | ptr,
|  | MutexType & | mutex
| ) |  |
| inline

Definition at line 68 of file LockedHandle.h.

68 : m_ptr( ptr ), m_mutex( &mutex ) { m_mutex->lock(); }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:76
LockedHandle::ConstGuard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:77

## ◆ ~ConstGuard()

template<class T, class MutexType = std::mutex>

LockedHandle< T, MutexType >::ConstGuard::~ConstGuard | ( |  | ) |
| inline

Definition at line 69 of file LockedHandle.h.

69 { m_mutex->unlock(); }
LockedHandle::ConstGuard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:77

## Member Function Documentation

## ◆ operator *()

template<class T, class MutexType = std::mutex>

const T& LockedHandle< T, MutexType >::ConstGuard::operator * | ( |  | ) | const
| inline

Definition at line 70 of file LockedHandle.h.

70 { return *m_ptr; }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:76

## ◆ operator const T &()

template<class T, class MutexType = std::mutex>

LockedHandle< T, MutexType >::ConstGuard::operator const T & | ( |  | ) | const
| inline

Definition at line 73 of file LockedHandle.h.

73 { return *m_ptr; }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:76

## ◆ operator->()

template<class T, class MutexType = std::mutex>

const T* LockedHandle< T, MutexType >::ConstGuard::operator-> | ( |  | ) | const
| inline

Definition at line 71 of file LockedHandle.h.

71 { return m_ptr; }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:76

## Member Data Documentation

## ◆ m_mutex

template<class T, class MutexType = std::mutex>

MutexType* LockedHandle< T, MutexType >::ConstGuard::m_mutex
| private

Definition at line 77 of file LockedHandle.h.

## ◆ m_ptr

template<class T, class MutexType = std::mutex>

const T* LockedHandle< T, MutexType >::ConstGuard::m_ptr
| private

Definition at line 76 of file LockedHandle.h.

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

- GaudiKernel/GaudiKernel/LockedHandle.h