CBMC
|
Allows to: More...
Public Member Functions | |
flag_overridet (const source_locationt &source_location) | |
void | set_flag (bool &flag, bool new_value, const irep_idt &flag_name) |
Store the current value of flag and then set its value to new_value . More... | |
void | disable_flag (bool &flag, const irep_idt &flag_name) |
Sets the given flag to false, overriding any previous value. More... | |
~flag_overridet () | |
Restore the values of all flags that have been modified via set_flag . More... | |
Private Attributes | |
const source_locationt & | source_location |
std::map< bool *, bool > | flags_to_reset |
std::set< bool * > | disabled_flags |
Allows to:
set_flag
disable_flag
, such that previous set_flag
are overridden and future set_flag
are ignored.A flag's initial value (before any set_flag
or disable_flag
) is restored when the entire object goes out of scope.
Definition at line 350 of file goto_check_c.cpp.
|
inlineexplicit |
Definition at line 353 of file goto_check_c.cpp.
|
inline |
Restore the values of all flags that have been modified via set_flag
.
Definition at line 407 of file goto_check_c.cpp.
|
inline |
Sets the given flag to false, overriding any previous value.
disable_flag
after set_flag
overrides the set valuedisable_flag
twice triggers an INVARIANT Definition at line 385 of file goto_check_c.cpp.
|
inline |
Store the current value of flag
and then set its value to new_value
.
set_flag
after disable_flag
is a no-opset_flag
twice triggers an INVARIANT Definition at line 363 of file goto_check_c.cpp.
|
private |
Definition at line 416 of file goto_check_c.cpp.
|
private |
Definition at line 415 of file goto_check_c.cpp.
|
private |
Definition at line 414 of file goto_check_c.cpp.