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-22 04:01:40 PST Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!news.mathworks.com!uunet!in1.uu.net!fdn.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!dinews.epfl.ch!di.epfl.ch!Robb.Nebbe From: Robb.Nebbe@di.epfl.ch (Robb Nebbe) Newsgroups: comp.lang.ada Subject: Re: Type extension questions Date: 22 Mar 1995 12:01:40 GMT Organization: Ecole Polytechnique Federale de Lausanne Sender: nebbe@lglsun3.epfl.ch (Robb Nebbe) Distribution: world Message-ID: <1995Mar22.125057@di.epfl.ch> References: NNTP-Posting-Host: lglsun3.epfl.ch Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 1995-03-22T12:01:40+00:00 List-Id: In article , koehnema@enuxsa.eas.asu.edu (Harry Koehnemann) writes: |> I have a couple questions on Ada95 tagged types. These appear to be |> easy questions, but I can't seem to locate an answer for either. |> LRM references would also be appreciated with an answer. |> |> 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 ); ... end P; A private_type_declaration must be completed with a full_type_declaration which is in 3.2.1 Robb Nebbe