Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.msm] BOOST_MSM_EUML_DECLARE_STATE_MACHINE with state base class
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2014-05-31 13:18:18


> I can do (with msm.euml):
>
> ...
> SomeState + SomeEvent / SomeAction
> ...
>
> But actually I want 'SomeState' to decide what it does on 'SomeEvent'.
>
> Wouldn't it make sense to call, for example,
>
> SomeState::operator()(SomeEvent const&)
>
> (or a templated form of that) in that case ?
> Or maybe 'SomeState::on_internal(...)' ?
>
> Any thoughts?
>
> Regards,
> Stefan
> --

Hi Stefan,
you can achieve the same with a transition table internal to a state, with
the added bonus that you can have guards and therefore several possible
actions depending on them.

HTH,
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