| The Gaudi Framework v29r1 (5cd95fa2)

- 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 >::Guard Class Reference

`#include <GaudiKernel/LockedHandle.h>`

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

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

## Private Attributes
T * | m_ptr {nullptr}
MutexType * | m_mutex {nullptr}

## Detailed Description

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

Definition at line 46 of file LockedHandle.h.

## Constructor & Destructor Documentation

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

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

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

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

Definition at line 51 of file LockedHandle.h.

51 : m_ptr( a.m_ptr ), m_mutex( a.m_mutex ) { a.m_mutex = nullptr; }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:61
LockedHandle::Guard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:62
template<class T, class MutexType = std::mutex>

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

Definition at line 53 of file LockedHandle.h.

53 : m_ptr( ptr ), m_mutex( &mutex ) { m_mutex->lock(); }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:61
LockedHandle::Guard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:62
template<class T, class MutexType = std::mutex>

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

Definition at line 54 of file LockedHandle.h.

54 { m_mutex->unlock(); }
LockedHandle::Guard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:62

## Member Function Documentation

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

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

Definition at line 58 of file LockedHandle.h.

58 { return *m_ptr; }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:61
template<class T, class MutexType = std::mutex>

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

Definition at line 55 of file LockedHandle.h.

55 { return *m_ptr; }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:61
template<class T, class MutexType = std::mutex>

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

Definition at line 56 of file LockedHandle.h.

56 { return m_ptr; }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:61

## Member Data Documentation

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

MutexType* LockedHandle< T, MutexType >::Guard::m_mutex {nullptr}
| private

Definition at line 62 of file LockedHandle.h.

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

T* LockedHandle< T, MutexType >::Guard::m_ptr {nullptr}
| private

Definition at line 61 of file LockedHandle.h.

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

- GaudiKernel/GaudiKernel/LockedHandle.h