Boost logo

Boost :

From: Peter Petrov (ppetrov_at_[hidden])
Date: 2005-03-13 11:27:42

Alexander Nasonov wrote:
> Peter Petrov wrote:
>>Probably. But it cannot support state-local storage in the same sense as
>>this library. (otherwise, I like it)
> What's wrong with my approach?

Suppose that we have nested states, and we use state-local storage in
the outer state. Now, for as long as we don't leave the outer state,
(only making transitions between its inner states), it is natural to
keep its storage. I.e. the lifetime of the storage should be the same as
the logical lifetime of the state.

Judging from your brief description of your approach, I presume that
leaving an inner-state will also destroy the outer-state, since they are
the same object (you said: "inheritance is used to model states

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