Kanzi  3.9.4
Kanzi Engine API
kanzi::FlagScopeGuard< FlagValue > Class Template Reference

Scope guard for boolean value. More...

#include <kanzi/core/util/flag_scope_guard.hpp>

Public Member Functions

 FlagScopeGuard (bool &flag)
 Constructor. More...
 
 ~FlagScopeGuard ()
 Destructor. More...
 

Detailed Description

template<bool FlagValue>
class kanzi::FlagScopeGuard< FlagValue >

Scope guard for boolean value.

When created, sets the flag to the specified value. When destroyed, sets the flag to the opposite value.

Constructor & Destructor Documentation

◆ FlagScopeGuard()

template<bool FlagValue>
kanzi::FlagScopeGuard< FlagValue >::FlagScopeGuard ( bool &  flag)
inlineexplicit

Constructor.

Parameters
flagflag which to set and unset.

◆ ~FlagScopeGuard()

template<bool FlagValue>
kanzi::FlagScopeGuard< FlagValue >::~FlagScopeGuard ( )
inline

Destructor.


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