comp.lang.ada
 help / color / mirror / Atom feed
From: gauthier@unilim.fr (Michel Gauthier)
Subject: Re: Strongly coupled generic children?
Date: 1996/04/23
Date: 1996-04-23T00:00:00+00:00	[thread overview]
Message-ID: <gauthier-2304961531160001@164.81.60.62> (raw)
In-Reply-To: 4lib04$juq@rigel.rz.uni-ulm.de

In article <4lib04$juq@rigel.rz.uni-ulm.de>,
rodemann@mathematik.uni-ulm.de (Joerg Rodemann) wrote:

>>  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
>> [...]
>>     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).
>> [...]
>>     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?
>> [...]
>>  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

This is a problem that I reached, too.

The solution that came to my mind is also to pass X.Y as a package
parameter of X.Z,
as you suggest. It worked in one case, but I got many gnat crashes in most
cases.

For some projects, the workaround to these crashes have been to declare
many _private_ entities in the root, and install renamings or similar in the
childs. I am aware that it is no more than a workaround.

----------          ----------          ----------          ---------- 
Michel Gauthier / Laboratoire d'informatique
123 avenue Albert Thomas / F-87060 Limoges
telephone +33 () 55457335 [or ~ 7232]
fax +33 ()  55457315  [or ~7201]
----------          ----------          ----------          ----------
La grande equation de la fin du siecle : windows-X = Mac-Y
The main end-of-century equation : windows-X = Mac-Y
----------          ----------          ----------          ----------
Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9
If you feel year 2000 a stupid mystic craze, use numeration base 9
----------          ----------          ----------          ----------




  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 Strongly coupled generic children? Joerg Rodemann
1996-04-23  0:00 ` Michel Gauthier [this message]
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