[DGD] Re: Recompiling object trees
harte at xs4all.nl
harte at xs4all.nl
Sat Feb 21 19:42:07 CET 1998
Quoting Jason's message from 21 Feb:
[...]
| >Which with the current DGD version is no longer an issue, provided you
| >build a mudlib (or lower level lib to base it on) to be able to
| >recompile a whole tree of objects, starting from the auto-object if you
| >have to.
| >
| >[...]
|
| I'm curious as to what you mean by this. Doesn't this imply keeping track
| of the inheritance tree for every object?
Yes. You'll need to track all dependencies, but most of all, if at all
times you want to be able to -do- this, you need to separate clonables,
inheritables, and other objects (such as rooms).
[...recompiling auto object...]
| Perhaps I've made a fundamental error or I'm missing something that is not
| explicitly stated. Thoughts?
No, you're right in saying that you'll need to more than just bluntly
try to recompile the auto-object.
When you want to 'upgrade' (as I call it, to distinguish between that
and simply recompiling one object) you need to determine a list of all
objects/programs that depend on it.
This list is to be divided into two separate ones. The first is the
list of inherited objects, the second is the list of leaf-objects, these
are either objects of which clones have been made or other objects
which are only used in their uncloned form, like rooms.
At that point there's two ways to go about things. The way I did it in
my own implementation is to destruct all the objects in the first list
and then recompile all the ones in the second list which will cause the
ones in the first list to be compiled again.
The other way is to destruct the `central' object on which they all
depend and then start recompiling the objects in the second list. The
assumption here is that recompile_object() will be called in the
driver-object with objects from the first list when appropriate at
which point you can destruct them.
Enough babbling from me for now, hope this helps. :-)
Erwin.
--
Erwin Harte / work: erwin at research.techforce.nl / play: harte at xs4all.nl
-----------------------------------------------------------------------
The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offense. --E. W. Dijkstra
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list