Martin Vuille | 11 Aug 13:56

[review] FSM Review Starts Today August 11th

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

The current submission is available from the sandbox vault at 
http://tinyurl.com/yjozfn (or 
http://www.boostpro.com/vault/index.php?action=downloadfile&filename=FSM.zip
&directory=&PHPSESSID=48493076c1ea60ae316f7b60f15b9ed1,
if you prefer.)

There has already been some discussion of the library
since the rewiew was first announced:
http://www.nabble.com/FSM-Review-Announcement-to18820219.html
http://www.nabble.com/FSM-Review-Reminder-to18890305.html

-----------
Description
-----------

"The main goals of the library are:

* Simplicity. It should be very simple to create state machine
  using this library. 
* Performance. The state machine infrastructure should not be very 
  time and memory-consuming in order to be applicable in more use
  cases. 
* Extensibility. A developer may want to add more states to the
(Continue reading)

Phil Endecott | 12 Aug 12:46

Re: [review] FSM Review Starts Today August 11th

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.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Andrey Semashev | 12 Aug 17:55

Re: [review] FSM Review Starts Today August 11th

Phil Endecott wrote:
> 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?

That's right.

> 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?

Yes, you can use enter/leave handlers. However, I would consider using 
boost::optional in order to avoid dynamic memory allocation.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane