On Wed, Jun 18, 2008 at 6:54 PM, Andreas Huber
Hi Felipe
[snip]
I would really want to pass a state instance to transit<>(). Why isn't this available?
Um, why do you want pass a *state* object to transit<>()? State construction & destruction must be done by the state machine itself.
I understand it conceptually, but practically I can't see much difference from I constructing it or the machine doing it. All I wanted is to pass constructor arguments. Explicitly or not. The machine would have to copy the state, but I don't mind if at least I can give arguments to the next state somehow. Can't we pass the arguments to transit<>() ? I'm not an expert in statechart implementation, but it shouldn't be that hard, transit<> could pass a boost::factory to the statechart internals responsible for instantiating a state.
Regards,
-- Andreas Huber
Thanks, -- Felipe Magno de Almeida