comp.lang.ada
 help / color / mirror / Atom feed
From: Gerald Kasner <Gerald.Kasner@Physik.Uni-Magdeburg.de>
Subject: Re: Extending tagged type with a task
Date: 2000/11/16
Date: 2000-11-16T00:00:00+00:00	[thread overview]
Message-ID: <3A13A017.EF04BD44@Physik.Uni-Magdeburg.de> (raw)
In-Reply-To: 3A138EA3.9DD2CD9B@CCI.de

Vincent Smeets schrieb:
> 
> Hello,
> 
> How can I extend a non-limited tagged type with an object of a task
> type? I can't change the type A.T to a limited type but B.T may be
> limited.
> 
> Thanks
> 
> --::::::::::::::
> --a.ads
> --::::::::::::::
> package A is
> 
>    type T is tagged null record;
> 
> end A;
> --::::::::::::::
> --b.ads
> --::::::::::::::
> with A;
> package B is
> 
>    task type B_Task_T;
> 
>    type T is new A.T with
>       record
>          B_Task : B_Task_T;
>       end record;
> 
> end B;
> 
> -- Vincent Smeets                 Competence Center Informatik GmbH
> -- Tel. : +49-5931-805461         Postfach 1225
> -- Fax  : +49-5931-805175         49702 Meppen, Germany
> -- EMail: Vincent.Smeets@CCI.de   http://www.CCI.de/
> -- PGP fingerprint: 53 1C 3B 6F B6 9A EB 83  B4 7E 25 08 78 BD 5C 2C

I would use a pointer to the task:

with A;
package B is
 
   task type B_Task_T;
   type b_task_ptr is access B_Task_T;
 
   type T is new A.T with
      record
         B_Task : B_Task_ptr;
      end record;
 
end B;    

Gerald




      reply	other threads:[~2000-11-16  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-16  7:37 Extending tagged type with a task Vincent Smeets
2000-11-16  0:00 ` Gerald Kasner [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