B2BITS FIX Antenna HFT  1.0.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Utils::DGuard< T > Class Template Reference

Debug helper template class. More...

#include <DGuard.h>

Public Member Functions

 DGuard (T &aLock)
 
 ~DGuard ()
 

Detailed Description

template<class T>
class Utils::DGuard< T >

Debug helper template class.

This template class employs a C++ idiom (described by Bjarne Stroustrup) that uses the constructor to acquire a resource automatically when an object of the class is created and uses the destructor to release the resource automatically when it goes out of scope. Since Guard is parameterized by the type of lock (such as Mutex), this class can be used with a fam-ily of synchronization wrappers that conform to a uniform interface.

E.g.: DGuard<Mutex> guard (lock_); // guard constructor acquires m_lock.

It also provides debug information.

Constructor & Destructor Documentation

template<class T >
Utils::DGuard< T >::DGuard ( T &  aLock)
inline
template<class T >
Utils::DGuard< T >::~DGuard ( )
inline