From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Giving a package specification access to the private types of another package
Date: Wed, 11 Dec 2002 19:22:05 GMT
Date: 2002-12-11T19:22:05+00:00 [thread overview]
Message-ID: <3DF7909C.1090800@acm.org> (raw)
In-Reply-To: mailman.1039586342.31407.comp.lang.ada@ada.eu.org
Grein, Christoph wrote:
> This is indeed the perfect design for your problem.
>
>>I think this is what I have done - and it works. My code is equivalent
>>to the example below. This works and seems to be the best way to do it.
>>
>>package B is
>> procedure Proc_B;
>>private
>> type Private_Type is new Integer;
>>end B;
>>
>>with B.A;
>>package body B is
>> procedure Proc_B is
>> Temp: Private_Type;
>> begin
>> A.Foobar(Temp);
>> end;
>>end B;
>>
>>private package B.A is
>> procedure Foobar(Temp: in Private_Type);
>>end B.A;
>>
>>package body B.A is
>> procedure Foobar(Temp: in Private_Type) is
>> begin
>> null;
>> end;
>>end B.A;
Perfect? That's a bit strong. It's a good design, but as given, I think
that putting Foobar in B (perhaps with "is separate") is as good.
--
Jeff Carter
"Beyond 100,000 lines of code you
should probably be coding in Ada."
P. J. Plauger
next prev parent reply other threads:[~2002-12-11 19:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-11 5:51 Giving a package specification access to the private types of another package Grein, Christoph
2002-12-11 19:22 ` Jeffrey Carter [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-12 7:14 Grein, Christoph
2002-12-12 17:01 ` Jeffrey Carter
2002-12-13 20:25 ` Steven Murdoch
2002-12-10 14:27 Grein, Christoph
2002-12-10 14:46 ` Steven Murdoch
2002-12-10 15:08 ` John Cupak
2002-12-10 15:31 ` Steven Murdoch
2002-12-10 13:51 Steven Murdoch
2002-12-10 13:53 ` Preben Randhol
2002-12-10 14:07 ` Steven Murdoch
2002-12-10 14:37 ` James S. Rogers
2002-12-10 14:54 ` Steven Murdoch
2002-12-10 15:54 ` Robert A Duff
2002-12-10 16:58 ` Steven Murdoch
2002-12-11 2:43 ` SteveD
2002-12-10 19:42 ` Stephen Leake
2002-12-10 14:36 ` Steven Murdoch
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox