Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2008-08-12 06:46:15


Martin Vuille wrote:
> The formal review for Andrey Semashev's Finite State Machines (FSM)
> library begins today and will run until the 20th.
>
> The documentation (overview and reference) is available online:
> http://boost-extension.redshoelace.com/docs/boost/fsm/doc/state_machine.html
> http://boost-extension.redshoelace.com/docs/boost/fsm/doc/reference.html

I have a question about the lifetime of the state objects.

I have the impression that the state objects are created when then FSM
is created and destroyed when it is destroyed. Is this correct?

Thinking about my own FSM code, implemented ad-hoc, I have variables
whose lifetime should correspond to the period spent in a particular
state. (Or, more generally, the period spent in a hierarchical group
of states.) It looks like I can get this only by using the enter/leave
hooks and a pointer. Is this correct?

Regards,

Phil.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk