Boost logo

Boost Users :

Subject: Re: [Boost-users] [statechart] Passing parameters from event to StateLocal Storage
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2010-08-05 17:10:05


> Was there any progress with this patch, i.e. is it possible in the current
> version to pass arbitrary arguments to a state constructor?

Unfortunately not, I have not heard anything from Felipe. I personally don't
see a good way how this can be implemented, so I'm really interested in his
approach.

> If not, what's the recommended workaround? To share data through the
> outermost state?

Either that, or:
1) Repost the event in the transition and have an in_state_reaction
(triggered by the same event) store whatever you need (typesafe), or
2) use triggering_event()
<http://www.boost.org/doc/libs/1_43_0/libs/statechart/doc/reference.html#triggering_event0>
(not typesafe)

HTH,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header. 

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