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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79354c36dcd6f9f6 X-Google-Attributes: gid103376,public From: paulg@loxinfo.co.th (Paul Sjoerdsma) Subject: Re: Reading objects from a file Date: 1997/04/15 Message-ID: <3354759f.8067470@news.loxinfo.co.th>#1/1 X-Deja-AN: 235376950 References: <335315cd.16603805@news.loxinfo.co.th> Organization: Straight Line Solutions Reply-To: paulg@loxinfo.co.th Newsgroups: comp.lang.ada Date: 1997-04-15T00:00:00+00:00 List-Id: paulg@loxinfo.co.th (Paul Sjoerdsma) wrote: >Hi, > >I'm just starting using Ada and I have a, hopefully simple, question. > >First I'll explain what I am trying to do: > >I am rewriting a simple visualization program, which is used to output >geological (actually micro-paleontological) data. The program needs to >read frequence curves, process the data and output files. >The data structures used will I posted the previous message while it wasn't finished. Here is the rest. The data structures used (for the graphics part) will look something like: Graphic_Elem (base class) -- Line_Elem (child class) -- Polyline_Elem (child class) -- Solid_Elem (child class) etc The output would go tho=20 Graphic_Port (base class) Dxf_port (child class) Ascii_port (child class) There will also be a class Figure procedure Add(Figure, Graphic_Elem) procedure Draw(Figure, Graphic_Port) What I am looking for are methods for the Figure class procedure Read procedure Write in such a way that invoking Read(Figure) will build the appropriate structure. So when it encounters a saved Line_Elem in the file it will invoke the read procedure associated with the Line_Elem. regards Paul