Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-02-15 10:21:33

"Alexander Nasonov" <alnsn_at_[hidden]> 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

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