![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
restores the state of the inference engine (see stateRestorer_) when destroyed More...
#include <graphicalModelInference.h>
Public Member Functions | |
| StateGuard_ (GraphicalModelInference< GUM_SCALAR > &inference) | |
| ~StateGuard_ () noexcept(false) | |
| StateGuard_ (const StateGuard_ &)=delete | |
| StateGuard_ & | operator= (const StateGuard_ &)=delete |
Private Attributes | |
| std::function< void() > | _restore_ |
| int | _uncaught_exceptions_ |
| number of uncaught exceptions when the guard was created | |
restores the state of the inference engine (see stateRestorer_) when destroyed
If the restoration throws while no exception is propagating, this exception is propagated. If the guard is destroyed during stack unwinding, the restoration is still attempted but its own exception (if any) is discarded: the original exception is propagated (a second exception would call std::terminate).
Definition at line 441 of file graphicalModelInference.h.
|
explicit |
Definition at line 660 of file graphicalModelInference_tpl.h.
References gum::GraphicalModelInference< GUM_SCALAR >::GraphicalModelInference(), _restore_, _uncaught_exceptions_, and gum::GraphicalModelInference< GUM_SCALAR >::stateRestorer_().
Referenced by StateGuard_(), and operator=().
| gum::GraphicalModelInference< GUM_SCALAR >::StateGuard_::~StateGuard_ | ( | ) |
Definition at line 665 of file graphicalModelInference_tpl.h.
References _restore_, and _uncaught_exceptions_.
|
delete |
|
delete |
|
private |
Definition at line 450 of file graphicalModelInference.h.
Referenced by StateGuard_(), and ~StateGuard_().
|
private |
number of uncaught exceptions when the guard was created
Definition at line 453 of file graphicalModelInference.h.
Referenced by StateGuard_(), and ~StateGuard_().