Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-02-14 10:05:10


"Alexander Nasonov" <alnsn_at_[hidden]> writes:

> David Abrahams wrote:
>> Okay, but what's the value of modeling an is-a relationship between
>> states? In a FSM, states are distinct. One state is-not-a nother
>> state.
>
> Dog is-a Animal at modelling state.

Sorry, I don't understand the meaning of "at modelling state." Oh,
you mean "at modelling stage?"

> At runtime
>
> Dog dog;
>
> is not-a
>
> Animal animal;
>
> Likewise, Running state is-a Active state at modelling stage.

So it's just a way of classifying states with common properties?

>> AFAICT it seems to be a way of grouping states, or perhaps of
>> emulating substates, so you can avoid writing the transitions
>> that a group of states has in common (?)
>
> Yep.

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

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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