|
Boost Users : |
Subject: Re: [Boost-users] [msm] EUML submachine without macro
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2011-06-29 16:38:45
> I have an addition question regarding the pseudo exit point.
>
> The following code adds a pseudo exit point to your
> CompositeTutorialWithEumlTable.cpp example:
>
> // Exit event
> struct exit_impl : msm::front::euml::euml_event<exit_impl>{};
> exit_impl ev_exit;
> ...
> // Submachine
> struct _Playing : public msm::front::state_machine_def<_Playing >
> {
> ...
> // Pseudo exit state
> struct Exit_ : public msm::front::exit_pseudo_state<exit_impl>
> , public msm::front::euml::euml_state<Exit_> {};
> static Exit_ Exit;
> ...
> BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE((
> Exit == Song1 + ev_exit
> ),transition_table )
> };
>
> I'm in doubt what should be stated in the main machine's transition table.
> The Stopped state is never reached when this line is used:
>
> Stopped == exit_pt_(Playing , _Playing::Exit) + ev_exit
>
> However, this entry works:
>
> Stopped == Playing + ev_exit
>
> Could you please clarify what should be actually entered.
I'm unsure why it didn't work but I found a way around. You'll need to get
the trunk version.
Unfortunately this means a small breaking change in the definition of
submachines to:
typedef boost::msm::back::state_machine<Playing_> Playing_helper;
struct Playing_impl : public Playing_helper,
public
msm::front::euml::euml_state<Playing_helper>
{};
I hate breaking changes but this time I found no way around.
I also updated the doc and the example.
Please let me know if it now works as expected (it passes my test).
Regards,
Christophe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net