|
Boost : |
From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2004-06-03 02:58:51
"Andreas Huber" <ah2003_at_[hidden]> wrote in message
news:c9l4es$tf7$1_at_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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk