Public Member Functions | Private Attributes
utilmm::auto_flag< T > Class Template Reference

#include <auto_flag.hh>

List of all members.

Public Member Functions

 auto_flag (int &field, int mask, bool value=true, bool restore_old=true)
bool get ()
void set (bool value)
 ~auto_flag ()

Private Attributes

int & m_field
int m_mask
bool m_restore

Detailed Description

template<typename T>
class utilmm::auto_flag< T >

Automatically sets and resets a boolean flag on construction and destruction

Definition at line 11 of file auto_flag.hh.


Constructor & Destructor Documentation

template<typename T>
utilmm::auto_flag< T >::auto_flag ( int &  field,
int  mask,
bool  value = true,
bool  restore_old = true 
) [inline]

Definition at line 19 of file auto_flag.hh.

template<typename T>
utilmm::auto_flag< T >::~auto_flag ( ) [inline]

Definition at line 26 of file auto_flag.hh.


Member Function Documentation

template<typename T>
bool utilmm::auto_flag< T >::get ( ) [inline]

Definition at line 28 of file auto_flag.hh.

template<typename T>
void utilmm::auto_flag< T >::set ( bool  value) [inline]

Definition at line 29 of file auto_flag.hh.


Member Data Documentation

template<typename T>
int& utilmm::auto_flag< T >::m_field [private]

Definition at line 14 of file auto_flag.hh.

template<typename T>
int utilmm::auto_flag< T >::m_mask [private]

Definition at line 15 of file auto_flag.hh.

template<typename T>
bool utilmm::auto_flag< T >::m_restore [private]

Definition at line 16 of file auto_flag.hh.


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


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Mon Oct 6 2014 03:17:01