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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab090844d583ab0b X-Google-Attributes: gid103376,public From: stt@henning.camb.inmet.com (Tucker Taft) Subject: Re: Q. about Inheritance in Ada95 Date: 1996/07/03 Message-ID: #1/1 X-Deja-AN: 163419235 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: henning.camb.inmet.com references: <4rc2q8$b84@portal.gmu.edu> organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-07-03T00:00:00+00:00 List-Id: 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