diff --git a/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp b/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp index 4bf9c3309..2e9343272 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp @@ -48,6 +48,7 @@ public: const std::string& name() const; bool operator==(const PyAction& other) const; PyAction::RunCount run_count() const; + bool active() const; ~PyAction(); /* @@ -75,6 +76,7 @@ private: RunCount m_run_count; std::string input_code; void * m_storage = nullptr; + mutable bool m_active = true; }; } diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp index 4f5a79992..0cb31d472 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp @@ -93,6 +93,10 @@ PyAction::RunCount PyAction::run_count() const { return this->m_run_count; } +bool PyAction::active() const { + return this->m_active; +} + /* The python variables are reference counted and when the Python dictionary stored in this->m_storage is destroyed the Python runtime system is involved.