diff --git a/src/state_block.h b/src/state_block.h index b622bdb6a199cba18e8afd27d740ae9d6ec7b5b3..3b6e16cae925660a21758456c346b45b8309d17f 100644 --- a/src/state_block.h +++ b/src/state_block.h @@ -28,7 +28,21 @@ namespace wolf { */ class StateBlock { +public: + + enum class Notification : std::size_t + { + ADD = 0, + REMOVE, + UPDATE, + FIX_UPDATE, + ENABLED + }; + protected: + + std::atomic<StateBlock::Notification> notification_; + NodeBaseWPtr node_ptr_; //< pointer to the wolf Node owning this StateBlock bool fixed_; ///< Key to indicate whether the state is fixed or not @@ -99,6 +113,10 @@ class StateBlock void removeLocalParametrization(); + void notify(const StateBlock::Notification n); + + StateBlock::Notification notify() const noexcept; + }; } // namespace wolf @@ -196,6 +214,16 @@ inline void StateBlock::setLocalParametrizationPtr(LocalParametrizationBasePtr _ local_param_ptr_ = _local_param; } +inline void StateBlock::notify(const StateBlock::Notification n) +{ + notification_ = n; +} + +inline StateBlock::Notification StateBlock::notify() const noexcept +{ + return notification_; +} + } // namespace wolf #endif