Hello everyone,
I have an issue with* Boost MSM*. Using *Boost MSM eUML* I have created a state machine. Actually I created *HSM* (Hierarchical State Machine) or Composite State Machine as second name. And I faced with issue: How to share attributes between Parent State Machine and Sub-State Machines (or Child State Machine) ??
I have not found an answer on this question ... Could anyone possibly help me ?
*Thanks,*
*Best RegardsDenis Kotov*
Hi Denis,
I think the best way is to have your attributes owned by the top-level
state machine, then passed to the composite as say, a pointer. The
top-level can call get_state, then set the attribute. For example, with
eUML, supposing you declared the attribute with
BOOST_MSM_EUML_DECLARE_ATTRIBUTE (or without for other front-ends):
get_state