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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b330d3baa1c7a1b5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.71.MISMATCH!xlned.com!feeder3.xlned.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!border-1.ams.xsnews.nl!feed.xsnews.nl!border-2.ams.xsnews.nl!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada 2005 OOP : newbie questions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Thu, 27 Jan 2011 16:15:20 +0100 Message-ID: NNTP-Posting-Date: 27 Jan 2011 16:15:25 CET NNTP-Posting-Host: 2b9a8678.newsspool1.arcor-online.net X-Trace: DXC=Y\A_NRDLlVLX36K@\WTHGJic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgB6E_NldJ1nGB[6LHn;2LCVN7enW;^6ZC`D\`mfM[68DCC8EiANP7AoVD X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16736 Date: 2011-01-27T16:15:25+01:00 List-Id: On Thu, 27 Jan 2011 14:54:01 +0000, Bill Findlay wrote: > I have a package P that declares > > type R is new Limited_Controlled with private; > > The private extension of R contains a number of fields that I want to be > common to future derived types S, T, etc; P declares a number of primitive > operation signatures of R that I want S, T, etc, to override; and there are > some operations on R'Class in P as well. > > 1. Can I prevent objects of type P.R from being declared, > while allowing objects of types S, T, etc? A type with no instances is abstract: type R is abstract new Limited_Controlled with private; > 2. Can I prevent a useless primitive of P.R, say P.Op from being called? Useless in which sense? If the operation cannot be implemented in R, it should be abstract to be implemented in S and T. procedure Foo (Object : in out R) is abstract; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de