> After Ev5 machine goes to A2 -> A21 state.
> After Ev3 machine leaves state A with history and goes to state B.
> After Ev4 machine leaves state B and should go back to A2 -> A21 but actually
goes to A -> A1 -> A11 - default states.
> How I can fix it?
From a cursory glance at the code, it seems it behaves as it should. Why do you
think that transitioning to deep history with default A11 should go to A2? It
seems you'd get what you want by transitioning to deep history with default A1.
HTH,
Andreas Huber
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ilya Orlov <iorlov <at> gmail.com> writes:I guess you are missing the fact that the template argument passed to
> I missed your advice in previous message. I changed transition code to A1
state and it worked perfectly. But ideally, I'd like to transit from B not to
A1 but to A state. How I can change this code to get it working with saving all
history for A-substates?
deep_history is actually the *default* *state*. This is the state that is
entered when no history has ever been saved. If history has been saved (as is
the case in your example code) then transit< sc::deep_history < StateA1 > >()
will transit to whatever inner state of A was active before A was exited. This
is explained in more detail here:
<http://www.boost.org/doc/libs/1_52_0/libs/statechart/doc/tutorial.html#History>