cprover
flag_resett Class Reference

Set a Boolean flag to a new value (via set_flag) and restore the previous value when the entire object goes out of scope. More...

+ Collaboration diagram for flag_resett:

Public Member Functions

void set_flag (bool &flag, bool new_value)
 Store the current value of flag and then set its value to new_value. More...
 
 ~flag_resett ()
 Restore the values of all flags that have been modified via set_flag. More...
 

Private Attributes

std::list< std::pair< bool *, bool > > flags_to_reset
 

Detailed Description

Set a Boolean flag to a new value (via set_flag) and restore the previous value when the entire object goes out of scope.

Definition at line 1876 of file goto_check.cpp.

Constructor & Destructor Documentation

◆ ~flag_resett()

flag_resett::~flag_resett ( )
inline

Restore the values of all flags that have been modified via set_flag.

Definition at line 1890 of file goto_check.cpp.

Member Function Documentation

◆ set_flag()

void flag_resett::set_flag ( bool &  flag,
bool  new_value 
)
inline

Store the current value of flag and then set its value to new_value.

Definition at line 1880 of file goto_check.cpp.

Member Data Documentation

◆ flags_to_reset

std::list<std::pair<bool *, bool> > flag_resett::flags_to_reset
private

Definition at line 1897 of file goto_check.cpp.


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