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

◆ auto_flag()

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

◆ ~auto_flag()

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

◆ get()

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

Get the current value of the flag

Returns
the current value of the flag

◆ operator safe_bool()

utilmm::auto_flag< bool >::operator safe_bool ( ) const
inline

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

Generated on Mon Oct 22 2018 18:39:28 for Util-- by doxygen 1.8.13
SourceForge.net Project Page