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,68c80d9ad156e257 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-25 03:29:26 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!news.alpha.net!news.mathworks.com!zombie.ncsc.mil!admii!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: comar@cs.nyu.edu (Cyrille Comar) Newsgroups: comp.lang.ada Subject: Re: Type extension questions Date: 25 Mar 1995 01:59:57 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3l0f1d$aul@lang8.cs.nyu.edu> References: NNTP-Posting-Host: lang8.cs.nyu.edu Date: 1995-03-25T01:59:57-05:00 List-Id: koehnema@enuxsa.eas.asu.edu (Harry Koehnemann) writes: : In article <1995Mar22.125057@di.epfl.ch> Robb.Nebbe@di.epfl.ch (Robb Nebbe) writes: : >In article , koehnema@enuxsa.eas.asu.edu (Harry Koehnemann) writes: : >|> : >|> 1) Is it possible to derive a type such that the parent operations are not : >|> available to the user of the new type? This question is equivalent to : >|> the ability to do private inheritance ala C++ - class B: private A { ...}; : >|> I would assume the answer is yes, but haven't yet figured out how. : > : >Yes. For example when you need a type to be controlled typically you don't : >want to expose the finalize, initialize and adjust operations to the client : >so you write: : > : > package P is : > : > type T is private; : > : > private : > : > type T is new Ada.Finalization.Controlled with ... : > : > procedure Adjust( Object : in out T ); : : I don't think my request was clear enough. This is close, but I'd : like P.T to be extensible. The above approach hides the fact that P.T : is tagged and therefore extensions of P.T are not allowed. What I : really want is private inheritance ala C++. : : Thanks for the reply. Any other suggestions? : : -- : Harry Koehnemann Arizona State University : hek@asu.edu Computer Science Department -- ------------------------------------------------------------------------ Cyrille Comar, E-mail: comar@cs.nyu.edu Gnat Project US phone: (212) 998-3489