Util--  1.1
Classes | Public Member Functions | List of all members
utilmm::auto_flag< bool > Class Template Reference

#include <utilmm/auto_flag.hh>

Inheritance diagram for utilmm::auto_flag< bool >:
Inheritance graph
[legend]
Collaboration diagram for utilmm::auto_flag< bool >:
Collaboration graph
[legend]

Public Member Functions

 auto_flag (bool &flag, bool init=true, bool restore_old=true)
 
 ~auto_flag ()
 
bool get () const
 
 operator safe_bool () const
 

Constructor & Destructor Documentation

utilmm::auto_flag< bool >::auto_flag ( bool &  flag,
bool  init = true,
bool  restore_old = true 
)
inline

Sets flag to init. On destruction, the flag will be set to either ! init if restore_old is false, or to the initial flag value if restore_old is true

utilmm::auto_flag< bool >::~auto_flag ( )
inline

Sets the value of the flag according to the restore_old argument of the constructor

Member Function Documentation

bool utilmm::auto_flag< bool >::get ( ) const
inline

Get the current value of the flag

Returns
the current value of the flag
utilmm::auto_flag< bool >::operator safe_bool ( ) const
inline

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

Generated on Tue Oct 9 2018 10:12:45 for Util-- by doxygen 1.8.6
SourceForge.net Project Page