From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6eac62e4f2badf3a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-08 05:57:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.aset.psu.edu!not-for-mail From: Robert Spooner Newsgroups: comp.lang.ada Subject: Re: Persistence of limited tagged types Date: Tue, 08 Apr 2003 08:56:25 -0400 Organization: Penn State University, Center for Academic Computing Message-ID: <3E92C6F9.70303@psu.edu> References: <3E91DCEA.5030006@psu.edu> NNTP-Posting-Host: nat3.arl.psu.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: f04n12.cac.psu.edu 1049806585 50336 146.186.165.37 (8 Apr 2003 12:56:25 GMT) X-Complaints-To: usenet@f04n12.cac.psu.edu NNTP-Posting-Date: Tue, 8 Apr 2003 12:56:25 +0000 (UTC) To: Stephen Leake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en,de,fr-FR Xref: archiver1.google.com comp.lang.ada:35986 Date: 2003-04-08T08:56:25-04:00 List-Id: Stephen Leake wrote: > Robert Spooner writes: > > >>I think that if you use 'output to put the object onto the disk, it >>will put the external representation of the tag out with it. Then if >>you use 'imput to read it back in as an object of type Object'class >>you will get what you're looking for. > > > That is certainly true. The trick is to get an object of type > Object'class; it's an unconstrained type, so you can't just do: > > An_Object : Object'class; > > In practice, you need to know the concrete object type _before_ you > call 'input, so you can allocate (or declare) an object of that type. > That means some representation of the tag must be stored in the > external file separately from the object, so you can read it first. > The input attribute is a function, so you can initialize an object of the class using it without a priori knowledge of the type. Bob -- Robert L. Spooner Registered Professional Engineer Associate Research Engineer Intelligent Control Systems Department Applied Research Laboratory Phone: (814) 863-4120 The Pennsylvania State University FAX: (814) 863-7841 P. O. Box 30 State College, PA 16804-0030 rls19@psu.edu