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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a270a1fc28d4f812 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-26 15:02:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: OOD in Ada? Date: Wed, 26 Jun 2002 08:49:54 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3d135676$0$8511$cc9e4d1f@news.dial.pipex.com> <3d1870b0$0$8507$cc9e4d1f@news.dial.pipex.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1025095796 22952 136.170.200.133 (26 Jun 2002 12:49:56 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 26 Jun 2002 12:49:56 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:26726 Date: 2002-06-26T12:49:56+00:00 List-Id: I'm not sure all the newsgroup data is getting through. I've outlined basically that twice & maybe the OP isn't seeing it. You can use child packages or non-child packages that inherit from some base class. The important thing is that as long as the subclasses inherit from a base class you can have an access value to anything within the class heierarchy - hence classes "A" and "B" can have references to each other. A good example of this is the XML DOM - You start with a base class called "Node" which doesn't represent any actual elements in the DOM tree, but defines some common characteristics. (Perfect case for an abstract class.) All other elements of an XML document are represented as a derived class from this base class. Since many of the XML document elements contain other elements that might be composed of yet other elements of all sorts of types, you need to have them able to hold references to each other but without the "withing problem". The base class of type "Node" fixes this - you have an access type that can reference anything of type Node'Class & then you're stardust. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Hyman Rosen" wrote in message news:Dl8S8.26239$cE5.16490@nwrddc02.gnilink.net... > > Keeping in mind that I don't know Ada, isn't this what child packages are for? > Declare the base expression and statement classes in a package, and put each > descendant in its own child package. >