Boost logo

Boost Users :

Subject: [Boost-users] [statechart] Pass event data to state constructor?
From: Bill Clark (bill_at_[hidden])
Date: 2009-09-02 14:28:50


I'd like to be able to communicate the data from an event to the state(s)
that get constructed as a result of a transition. I don't see an obvious way
to do that, since the constructors of a state object either take only a
context parameter (this is in an asychronous_state_machine), or also take a
transition action plus an event. I can save the event data within the
context object and then retrieve it post-construction, but that seems
error-prone. Is there a better way to do this?

Thanks,
Bill



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