comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@aol.com>
Subject: Re: my instansiation of a generic Remote_Call_Interface need a type declared in a package of wrong categorization
Date: Thu, 25 Jul 2013 10:00:17 -0700 (PDT)
Date: 2013-07-25T10:00:17-07:00	[thread overview]
Message-ID: <39c8fb6b-314c-4eae-80a5-74bfaf6de16b@googlegroups.com> (raw)
In-Reply-To: <14e47bb4-a838-47f8-8617-eb404679d3af@googlegroups.com>

On Thursday, July 25, 2013 9:26:13 AM UTC-7, donts...@gmail.com wrote:
> Hi!
> 
> 
> 
> I have created the following test packages for my question: My_RCI and Test_RCI(generic).
> 
> I am trying to create a distributed application. I would like to make several of these packages generic.
> 
> 
> 
> In some cases I run into the issue, that I wish to instantiate a Remote_Call_Interface package.
> 
> Below I have My_RCI. This package tries to instantiate the necessary packages. However, the __body__ of Test_RCI need a type that is declared in Core_Package. Core_Package is not of correct categorization (and I can't make it become so).
> 
> The specification part of Test_RCI and My_RCI are not depending on Core_Package.
> 
> As soon as I "with" the Core_Package I get error message of course.
> 
> Does it exists some method to "trinkle" Core_Package through to the body of Test_RCI? I have tried quite a few things to solve this, and I have at the moment given up:)

Can you move your generic instantiation to the body of My_RCI?  It looks like the only thing from the generic's specification that you need in the specification of My_RCI is the procedure Test_RCI.  You could declare that without a generic instantiation in My_RCI's spec, and in the body, make it a rename of This.Test_RCI.

If the specification of Test_RCI is more complex, so that there's a number of things that you want in the generic Test_RCI to be visible in My_RCI, then it might be possible to split the generic Test_RCI into two generic packages so that you instantiate one in My_RCI's spec, and the problematic one in My_RCI's body.  

Note: I haven't tested any of this.

                           -- Adam

  parent reply	other threads:[~2013-07-25 17:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 16:26 my instansiation of a generic Remote_Call_Interface need a type declared in a package of wrong categorization dontspam365
2013-07-25 16:51 ` Jeffrey Carter
2013-07-25 17:00 ` Adam Beneschan [this message]
2013-07-27  3:31 ` Randy Brukardt
replies disabled

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