
"Alexander Nasonov" <alnsn@yandex.ru> writes:
David Abrahams wrote:
So it's just a way of classifying states with common properties? Yes.
That's a clever approach to dealing with substates. I'm not sure it works for every case, but then, the details of how substates are supposed to work have always eluded me.
I'm not quite sure my approach works well with substates.
I still don't see how you can keep associated data stored in the Active base sub-object alive across all the other active states, at least not without copying it.
Transition is copying. It is implied by transition pattern:
NewState operator()(id, State, Event) const; ^^^^^^^^ new state is returned by value
That's a bit unattractive performance-wise. -- Dave Abrahams Boost Consulting www.boost-consulting.com