[DGD] another question about clones

Bart van Leeuwen bart at wotf.org
Thu Jan 8 12:29:54 CET 2004



On Wed, 7 Jan 2004, Par Winzell wrote:

> > Is there any built-in way of returning an array of the clones of a
> > master object, or do I need an object manager keeping track of clones to
> > be able to do this?
>
> The traditional method is a linked list. Each clone keeps a pointer to
> its next (and perhaps its previous) clone. The downside of that solution
> is that you can't acquire the pointers without swapping the objects in.
> With the recent addition of call_touch(), this has become especially
> important. On the other hand, you probably don't want object manager
> that keeps track of every clone of every master object.
>
> My suggestion is that you let the master copy of the object keep track
> of all its clones, possibly using a mapping of mappings.

This is workable and is what I use right now.
Actually, each 'master' only has to have an array of all its clones, you
can track all the masters with some kind of daemon still, the same daemon
can be used to track inheritance of course.

>
> Zell
>
> _________________________________________________________________
> List config page:  http://list.imaginary.com/mailman/listinfo/dgd
>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list