libUTL++
utl::FlagGuard Class Reference

Flag guard. More...

#include <FlagsMI.h>

Public Member Functions

 FlagGuard (FlagsMI *object, uint_t flagNum, bool val)
 Constructor. More...
 
 ~FlagGuard ()
 Restore the previous value of the flag. More...
 

Detailed Description

Flag guard.

Safely toggle a flag stored in a FlagMI-enabled object.

Author
Adam McKee

Definition at line 171 of file FlagsMI.h.

Constructor & Destructor Documentation

◆ FlagGuard()

utl::FlagGuard::FlagGuard ( FlagsMI object,
uint_t  flagNum,
bool  val 
)
inline

Constructor.

Parameters
objectobject whose flag is to be toggled
flagNumwhich flag to toggle
valdesired (temporary) value of flag

Definition at line 180 of file FlagsMI.h.

References utl::FlagsMI::getFlag().

◆ ~FlagGuard()

utl::FlagGuard::~FlagGuard ( )
inline

Restore the previous value of the flag.

Definition at line 190 of file FlagsMI.h.

References ASSERTD.


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