From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann)
Subject: Strongly coupled generic children?
Date: 1996/04/23
Date: 1996-04-23T00:00:00+00:00 [thread overview]
Message-ID: <4lib04$juq@rigel.rz.uni-ulm.de> (raw)
Hi folks!
Playing around with generics I stumbled over the following problem:
1.) I have a generic library unit x providing some key data of my problem
Generic parameter: e.g. floating point type
generic
type Floating is digits <>;
package x is
...
end x;
2.) Added to this is a child package x.y which provides some tables
used just for a small number of modules (This is different for x).
generic
package x.y is
...
procedure SomeWhat;
...
end x.y;
3.) Now I want to add another child unit x.z that provides some further
information. This module needs access to the data contained in x.y
but I do not want to put it into x.y because x.z may be exchanged
by some other package (that possibly also uses x.y).
Is there some way to do something like the following?
with x.y;
generic
package x.z is
...
procedure DoSomething;
...
end x.z;
package body x.z is
...
procedure DoSomething is
begin
...
x.y.SomeWhat;
...
end DoSomething;
...
end x.z;
Is it possible in Ada-95 to build up such a library structure? Or do I
have to deliver an instantiation of x.y as a generic parameter to x.z in
its instantiation?
Any help appreciated
Thanks
George
next reply other threads:[~1996-04-23 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-23 0:00 Joerg Rodemann [this message]
1996-04-23 0:00 ` Strongly coupled generic children? Michel Gauthier
1996-04-24 0:00 ` Pascal Ledru
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox