|
Boost : |
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2008-04-30 16:54:05
Hi Lutz
> is there a way to perform leaving the source state and entering the
> target state seperately instead of doing it in one step using "transit"?
> My problem is that i would like the action code of the transition
> executed after the exit action of the source state and before the entry
> action of the target state.
Which is the exact sequence a boost::statechart::transition with a
transition action will trigger. Please see:
<http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/tutorial.html#TransitionActions>
Of course, you can also pass a transition action to transit().
The react function that is called as result of a triggered custom_reaction
allows you to control better what happens (e.g. by looking at the contents
of the event first). You can e.g. transition to another state, terminate the
machine or do nothing at all. boost::statechart::transition simply always
transitions to the specified state.
HTH,
-- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk