[MSM] Substatemachine with constructor arguments

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[MSM] Substatemachine with constructor arguments

Boost - Users mailing list
Hi all,

My question regards boost's Meta State Machine (MSM) usage.

In my current design of a state machine it would be desirable to pass
arguments to the substate machine; this would be done at time of creation of
"main state machine".

I found something on the documentation close to what I am looking for,
however not exactly.  State machine constructor with arguments
. This works very well for states, but doesn't work for the substate
machine. Fails in compilation with the following log:

In the  example
found in the documentation I would changed the *Playing* substate machine to
look like:

and in creation of the *player* to do something like:

See the file attached. msm_substm.cpp

Is there a way of achieving this?

Many thanks in advance.

Joao Portela

Sent from: http://boost.2283326.n4.nabble.com/Boost-Users-f2553780.html
Boost-users mailing list
[hidden email]