Boost logo

Boost :

From: David Cattarin (ditto_at_[hidden])
Date: 2002-09-08 14:00:30

Andreas Huber wrote:

>>>- Is it possible to "scope" the data appropriately?
>>Can you clarify what you mean by scope?
>By "to scope" (is this a verb in English?) I mean giving your data the exact
>lifetime it should logically have. That is, why should data that is only
>used in a small part of the machine continue to live when that part is left?

Sorry, it wasn't clear to me that you were refering to object lifetimes.
Scope is a bit overloaded.

Anyway, I don't believe it is up to the state machine framework to
ensure that. I let the user decide how to control this since there are
cases where data must be kept local to a state and there are cases where
it is not. It is like using FILE*. You can use a smart pointer or not,
but it is up to you to decide when you are done with the data.

I use a Property Map to store state variables. If scoping is important
to you, it should not be difficult to define policies to describe data
lifetimes. Then the framework can destroy data that has gone out of scope.


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