Many thanks, this is the answer I needed! Cyril. On 18/06/2011 11:06, Christophe Henry wrote:
I am a new user of the Boost MSM library and I was wondering how to post internal events. It seems that only events can be sent from the back end, am I wrong?
Yes they can only be sent from the back-end but it it shouldn't be a problem. You can define a functor doing this (http://svn.boost.org/svn/boost/trunk/libs/msm/doc/HTML/ch03s03.html#d0e1298), for example:
struct store_cd_info { template
void operator()(Evt const&, Fsm& fsm, SourceState&,TargetState& ) { fsm.process_event(play()); } }; The "Fsm" template parameter is the back-end. With eUML you also have a process_ function.
Only the basic front-end really is too simple. Inside this front-end, you could static_cast to the back-end type but this would really not be a good solution, so I advise you to switch to the more powerful front-ends, or to at least mix and use a "Row" instead of the xxx_row versions for the transitions when you need to post another event (you can mix row types).
HTH, Christophe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- ************************************** Dr. Cyril Ballagny R&D Department Softeam, ModelioSoft, France http://www.softeam.com/ http://www.modeliosoft.com/ Tel. +33 130121675 (office) **************************************