comp.lang.ada
 help / color / mirror / Atom feed
* Re: Extending tagged type with a task
  2000-11-16  7:37 Extending tagged type with a task Vincent Smeets
@ 2000-11-16  0:00 ` Gerald Kasner
  0 siblings, 0 replies; 2+ messages in thread
From: Gerald Kasner @ 2000-11-16  0:00 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Extending tagged type with a task
@ 2000-11-16  7:37 Vincent Smeets
  2000-11-16  0:00 ` Gerald Kasner
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Smeets @ 2000-11-16  7:37 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-16  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-16  7:37 Extending tagged type with a task Vincent Smeets
2000-11-16  0:00 ` Gerald Kasner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox