Boost logo

Boost :

From: Andreas Huber (ah2003_at_[hidden])
Date: 2004-06-02 12:57:57

Johan Nilsson wrote:
[snipped example of calling virtual functions from a state ctor]

I'm too lazy to look in the standard what exactly is allowed w.r.t calling
virtual functions from ctors, but I'd very much expect that this should work
(since we're *not* calling a function that is potentially overridden in a
derived class).

> - 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
FSMs usually do this by posting internal events, boost::fsm is no different



Boost list run by bdawes at, gregod at, cpdaniel at, john at