From: koehnema@enuxsa.eas.asu.edu (Harry Koehnemann)
Subject: Re: Type extension questions
Date: Thu, 23 Mar 1995 22:05:25 GMT
Date: 1995-03-23T22:05:25+00:00 [thread overview]
Message-ID: <D5wyp1.Fsv@ennews.eas.asu.edu> (raw)
In-Reply-To: 1995Mar22.125057@di.epfl.ch
In article <1995Mar22.125057@di.epfl.ch> Robb.Nebbe@di.epfl.ch (Robb Nebbe) writes:
>In article <D5tFuE.1vx@ennews.eas.asu.edu>, 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
next prev parent reply other threads:[~1995-03-23 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-22 0:25 Type extension questions Harry Koehnemann
1995-03-22 12:01 ` Robb Nebbe
1995-03-23 22:05 ` Harry Koehnemann [this message]
1995-03-25 6:59 ` Cyrille Comar
1995-03-25 7:13 ` Cyrille Comar
1995-03-27 0:00 ` Norman H. Cohen
1995-03-30 0:00 ` Cyrille Comar
1995-03-27 17:29 ` Harry Koehnemann
1995-03-27 20:26 ` Robert I. Eachus
1995-03-29 0:00 ` Harry Koehnemann
1995-03-27 20:37 ` Kennel
1995-03-23 22:03 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox