utilmm::auto_flag< bool > Class Template Reference

#include <utilmm/auto_flag.hh>

List of all members.

Public Member Functions

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

Classes

struct  safe_bool_struct

template<>
class utilmm::auto_flag< bool >


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 Feb 19 10:51:01 2008 for Util-- by doxygen 1.5.3
SourceForge.net Project Page