Public Member Functions | Private Attributes | List of all members
FIX::Locker Class Reference

Locks/Unlocks a mutex using RAII. More...

#include <Mutex.h>

Collaboration diagram for FIX::Locker:
Collaboration graph
[legend]

Public Member Functions

 Locker (Mutex &mutex)
 
 ~Locker ()
 

Private Attributes

Mutexm_mutex
 

Detailed Description

Locks/Unlocks a mutex using RAII.

Definition at line 95 of file Mutex.h.

Constructor & Destructor Documentation

◆ Locker()

FIX::Locker::Locker ( Mutex mutex)
inline

Definition at line 98 of file Mutex.h.

99 : m_mutex( mutex )
100 {
101 m_mutex.lock();
102 }
Mutex & m_mutex
Definition Mutex.h:109
void lock()
Definition Mutex.h:57

References FIX::Mutex::lock(), and m_mutex.

◆ ~Locker()

FIX::Locker::~Locker ( )
inline

Definition at line 104 of file Mutex.h.

105 {
106 m_mutex.unlock();
107 }
void unlock()
Definition Mutex.h:70

References m_mutex, and FIX::Mutex::unlock().

Member Data Documentation

◆ m_mutex

Mutex& FIX::Locker::m_mutex
private

Definition at line 109 of file Mutex.h.

Referenced by Locker(), and ~Locker().


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

Generated on Sun Mar 31 2024 07:07:24 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001