
"Andreas Huber" <ah2003@gmx.net> wrote in message news:c9l4es$tf7$1@sea.gmane.org...
Johan Nilsson wrote:
[snip]
- Is it possible to indicate that a state should exit right away in boost::fsm (I'm not sure what this would be referred to as in FSM terminology - a 'transitional state' perhaps)? E.g.:
struct flush_buffers : fsm::simple_state<...> { flush_buffers() { ... flush ... ... if ok - goto xxx_state ... if fail - return to previous } };
This has nothing to do with ctors/dtors. You cannot just "goto" another state inside an action and therefore entry()/exit() wouldn't change
anything
here. FSMs usually do this by posting internal events, boost::fsm is no different here.
This was just pseudo-code; I meant something corresponding to return "transit<other_state> / return transit<previous_state>". As I understand you this possible by posting an internal event from within the constructor? I'll have to bail out of this discussion anyway. Thanks for listening. // Johan