
Christophe Henry wrote:
Msm v2.0 is a redesign of Msm v1.20 and offers a separation beetween front- and back-ends.
MSM 1.20 allowed writing a state machine with actions/guards which modify some external state. E.g. <code> struct MyStateMachine : public boost::msm::state_machine { MyStateMachine( SomeExternalContext & context ) : context_( context ) {} SomeExternalClass &context_; ....guards/actions which mess with 'context_'... }; </code> However with MSM 2.0 this becomes: <code> struct MyStateMachine_ : public msm::front::state_machine_def<MyStateMachine_> { MyStateMachine( SomeExternalClass & context ) : context_( context ) {} SomeExternalClass &context_; .... }; typedef msm::back::state_machine<MyStateMachine_> MyStateMachine; </code> I no longer instantiate the state machine directly and cannot pass parameters to constructor and it seems that msm::back::state_machine will not do this for me (after a quick glance at the definition it seemed to me that msm::back::state_machine expects its template parameter to be default constructible). Is this wrong or am I missing something obvious? Is there some way I could still achieve the old functionality? Thank you for the great library btw. :) TIA