| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 78 of file LockedHandle.h.

## Constructor & Destructor Documentation

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

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

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

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

Definition at line 81 of file LockedHandle.h.

82 : m_ptr(a.m_ptr),
83 m_mutex(a.m_mutex)
84 {
85 a.m_mutex=nullptr;
86 }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:105
LockedHandle::ConstGuard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:106
template<class T, class MutexType = std::mutex>

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

Definition at line 88 of file LockedHandle.h.

89 : m_ptr(ptr),
90 m_mutex(&mutex)
91 {
92 m_mutex->lock();
93 }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:105
LockedHandle::ConstGuard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:106
template<class T, class MutexType = std::mutex>

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

Definition at line 94 of file LockedHandle.h.

94 {
95 m_mutex->unlock();
96 }
LockedHandle::ConstGuard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:106

## Member Function Documentation

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

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

Definition at line 100 of file LockedHandle.h.

100 {
101 return *m_ptr;
102 }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:105
template<class T, class MutexType = std::mutex>

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

Definition at line 97 of file LockedHandle.h.

97 { return *m_ptr; }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:105
template<class T, class MutexType = std::mutex>

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

Definition at line 98 of file LockedHandle.h.

98 { return m_ptr; }
LockedHandle::ConstGuard::m_ptr
const T * m_ptr
Definition: LockedHandle.h:105

## Member Data Documentation

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

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

Definition at line 106 of file LockedHandle.h.

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

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

Definition at line 105 of file LockedHandle.h.

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

- GaudiKernel/GaudiKernel/LockedHandle.h