From: stt@henning.camb.inmet.com (Tucker Taft)
Subject: Re: Q. about Inheritance in Ada95
Date: 1996/07/03
Date: 1996-07-03T00:00:00+00:00 [thread overview]
Message-ID: <DtyA93.LHF.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 4rc2q8$b84@portal.gmu.edu
Wajdi H Al-Jedaibi (INFT) (waljedai@site.gmu.edu) wrote:
: Here is the question:
: Does Ada 95 allows for task to be extended. It seems that this point
: is not clearly addressed in the ref manual.
No, only tagged types support type extension.
: If it does not, is there
: a way to to incorporate inheritance for ada tasks?
You can use inheritance with Ada tasks. Some of this is covered
in the excellent Burns & Welling book on Concurrency in Ada.
One way is to add an access discriminant to the task type, such as:
task type TT(Queue : access Queue_Type'Class) is ...
and then make dispatching calls on "Queue" inside the body of TT.
The tagged type Queue_Type can be extended and its operations overridden
to change the internal behavior of instances of TT.
: Thanks
: --
: Wajdi.
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Cambridge, MA USA
prev parent reply other threads:[~1996-07-03 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-02 0:00 Q. about Inheritance in Ada95 Wajdi H Al-Jedaibi (INFT)
1996-07-02 0:00 ` Robert A Duff
1996-07-03 0:00 ` Mark A Biggar
1996-07-03 0:00 ` Robert A Duff
1996-07-03 0:00 ` Jon S Anthony
1996-07-03 0:00 ` Tucker Taft [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox