Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!ix.netcom.com!netcomsv!uu3news.netcom.com!netcomsv!uu4news.netcom.com!slcgate!servio!servio!marcs
From: marcs@slc.com (Marc San Soucie)
Subject: Re: Deep Copy Needed
Message-ID: <marcs.814906183@servio>
Sender: news@slc.com (USENET News)
Nntp-Posting-Host: servio
Organization: GemStone Systems, Inc., Beaverton OR, USA
References: <RTJEwLL.wgoldring@delphi.com> <46jnd1$fu3@drivel.ics.uci.edu>
Date: 28 Oct 95 18:49:43 GMT
Lines: 19

jrobbins@chateau.ics.uci.edu (Jason Elliot Robbins) writes:

> The happy medium is to parameterize the copy code so that you can
> supply needed information about the relationships between objects in a
> given task, without hard coding that information proceedurally.

We implemented a suite of #deepCopy methods for GemStone which included
methods that accept class and instance variable "clamp" specifications. The
clamp specifications (usually Arrays of classes and/or IV names) indicate
either classes that should not be copied, or instance variables of selected
classes which should be transferred without copying.

This, combined with the ability to reimplement the supporting methods, 
allows for some reasonable control over deepCopy operations.

    Marc San Soucie
    GemStone Systems, Inc.
    Beaverton, Oregon
    marcs@slc.com
