Andrey Semashev | 11 Aug 19:53

Re: FSM Review Announcement

David Abrahams wrote:

>>>> - States are not an enum values but classes that may have a common
>>>> virtual base, which allows to have state-specific and shared data in
>>>> the FSM. The events are processed in states.
>>> I'm not sure that isn't overkill.  In our implementation you are free to
>>> add any data you like to the FSM and use it in your transition (member)
>>> functions.  
>> Your approach doesn't allow to separate state-specific data from the
>> common data. 
> 
> Yes, but in your approach the common data can't persist across state
> transitions.  Is that not a serious limitation?

Why? It does persist as long as the FSM persists. All states and their 
base classes are constructed and destroyed with the FSM and never in the 
middle.

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


Gmane