"Felipe Magno de Almeida"
On Fri, Jun 20, 2008 at 4:09 AM, Felipe Magno de Almeida
wrote: On Thu, Jun 19, 2008 at 5:22 PM, Andreas Huber
wrote: "Felipe Magno de Almeida"
wrote in message Sorry replying to myself, but I must correct somethings.
[snip]
I was thinking more that boost.statechart would always use a functional factory, like boost::function
() to instantiate states.
Which works for the construction of the destination state but not for the construction of possibly also entered outer and inner states of the destination state. For example, please have a look at the following chart: http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/LCA.gif During the transition triggered by the event Ev, the states X, Y and Z are entered and thus constructed. IIUC, with your approach it is only possible to pass arguments to the constructor of Y, but not to the ones of X and Z, correct? The solution I have in mind (see code in previous post) would allow you to selectively provide whatever arguments you might want to pass to X, Y and/or Z. Admittedly, passing arguments to outer and inner states of the destination might be a less frequent use case but I'd still rather not rule it out. Thoughts? Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.