CVC3
|
A class which sets a boolean value to true when created, and resets to false when deleted. More...
#include <cvc_util.h>
A class which sets a boolean value to true when created, and resets to false when deleted.
Useful for tracking when the control is within a certain method or not. For example, TheoryCore::addFact() uses d_inAddFact to check that certain other methods are only called from within addFact(). However, when an exception is thrown, this variable is not reset. The watcher class will reset the variable even in those cases.
Definition at line 108 of file cvc_util.h.
CVC3::ScopeWatcher::ScopeWatcher | ( | bool * | flag | ) | [inline] |
Definition at line 112 of file cvc_util.h.
References d_flag.
CVC3::ScopeWatcher::~ScopeWatcher | ( | ) | [inline] |
Definition at line 113 of file cvc_util.h.
References d_flag.
bool* CVC3::ScopeWatcher::d_flag [private] |
Definition at line 110 of file cvc_util.h.
Referenced by ScopeWatcher(), and ~ScopeWatcher().