28 #ifndef EWOMS_GENERIC_GUARD_HH 29 #define EWOMS_GENERIC_GUARD_HH 41 template <
class Callback>
52 : callback_(other.callback_)
53 , isEnabled_(other.isEnabled_)
55 other.isEnabled_ =
false;
74 { isEnabled_ = value; }
80 {
return isEnabled_; }
87 template <
class Callback>
88 GenericGuard<Callback> make_guard(Callback& callback)
89 {
return GenericGuard<Callback>(callback); }
A simple class which makes sure that a cleanup function is called once the object is destroyed...
Definition: genericguard.hh:42
bool enabled() const
Returns whether the guard object is "on duty" or not.
Definition: genericguard.hh:79
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
void setEnabled(bool value)
Specify whether the guard object is "on duty" or not.
Definition: genericguard.hh:73