So does the following sketch of an approach appear
feasible?
Store the current save level in a global integer.
Add a new member to all composite data-types
which is an integer representing this data's level.
Add a new member to all composite data-types
which is a pointer to its previous level.
This way the save and restore procedures need only
manipulate the global integer; but all "get" functions
will need to check for data with higher than the current
level and pop down the chain; and all "store" functions
need to check for data with lower than the current
level and push a new structure on the chain to contain
the new value.
My implementation is in C but I've tried to keep the
description language-neutral so as to invite opinions
from persons of varying expertise.
I think I'm just afraid of writing a routine to walk
through everything.
--
lxt