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-Thread: 103376,b330d3baa1c7a1b5,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Bill Findlay Newsgroups: comp.lang.ada Subject: Ada 2005 OOP : newbie questions Date: Thu, 27 Jan 2011 14:54:01 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net 2XeamhnRMRpcIreiicohtwmcoX/z9VTYrl9w+3clyS/xTgraWT Cancel-Lock: sha1:Rjd/yhY7+aRwSyJXtbASBpPIZuk= User-Agent: Microsoft-Entourage/12.28.0.101117 Thread-Topic: Ada 2005 OOP : newbie questions Thread-Index: Acu+Mgh5IYGsllwR9ky2ATyOnjTy3w== Xref: g2news2.google.com comp.lang.ada:17706 Date: 2011-01-27T14:54:01+00:00 List-Id: 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? 2. Can I prevent a useless primitive of P.R, say P.Op from being called? At the moment the body of P.Op raises an exception, but I would much prefer to have a compile-time check (of course). I feel sure that there is a general way of dealing with such issues, but at the moment I can't seem to see the wood for the trees. -- Bill Findlay with blueyonder.co.uk; use surname & forename;