Skip to content
Snippets Groups Projects
Commit 589ff6ee authored by Jeremie Deray's avatar Jeremie Deray
Browse files

embed notification within StateBlock class

parent 9752a540
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !138. Comments created here will be created in the context of that merge request.
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment