| The Gaudi Framework v28r2-patches (bc4ad17a)

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

51 : m_ptr(a.m_ptr),
52 m_mutex(a.m_mutex)
53 {
54 a.m_mutex=nullptr;
55 }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:74
LockedHandle::Guard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:75
template<class T, class MutexType = std::mutex>

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

Definition at line 57 of file LockedHandle.h.

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

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

Definition at line 63 of file LockedHandle.h.

63 {
64 m_mutex->unlock();
65 }
LockedHandle::Guard::m_mutex
MutexType * m_mutex
Definition: LockedHandle.h:75

## Member Function Documentation

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

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

Definition at line 69 of file LockedHandle.h.

69 {
70 return *m_ptr;
71 }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:74
template<class T, class MutexType = std::mutex>

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

Definition at line 66 of file LockedHandle.h.

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

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

Definition at line 67 of file LockedHandle.h.

67 { return m_ptr; }
LockedHandle::Guard::m_ptr
T * m_ptr
Definition: LockedHandle.h:74

## Member Data Documentation

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

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

Definition at line 75 of file LockedHandle.h.

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

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

Definition at line 74 of file LockedHandle.h.

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

- GaudiKernel/GaudiKernel/LockedHandle.h