From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Renaming of procedures in a generic instantiation
Date: Sun, 26 Sep 2010 00:40:48 -0700
Date: 2010-09-26T00:40:48-07:00 [thread overview]
Message-ID: <i7mu7a$gje$1@tornado.tornevall.net> (raw)
In-Reply-To: <8g890nFmqiU1@mid.individual.net>
On 09/25/2010 11:54 PM, Niklas Holsti wrote:
>
> No doubt you have already found a solution for Is_Empty, but anyway here
> is what I would do:
>
> function Is_Empty (Q : Queue) return Boolean
> is
> begin
> return Queues.Is_Empty (Queues.Set (Q));
> end Is_Empty;
Or change the name of the operation (Empty comes to mind). I would probably use
a wrapper record:
type Queue_Handle is
Value : Queues.Set;
end record;
procedure Put (Onto : in out Queue_Handle; Item : in Integer) is
-- null;
begin -- Put
Onto.Insert (New_Item => Item);
end Put;
function Is_Empty (Queue : in Queue_Handle) is
-- null;
begin -- Is_Empty
return Queue.Value.Is_Empty;
end Is_Empty;
--
Jeff Carter
"We'll make Rock Ridge think it's a chicken
that got caught in a tractor's nuts!"
Blazing Saddles
87
next prev parent reply other threads:[~2010-09-26 7:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 0:43 Renaming of procedures in a generic instantiation Gene
2010-09-26 6:54 ` Niklas Holsti
2010-09-26 7:40 ` Jeffrey Carter [this message]
2010-09-26 8:41 ` Niklas Holsti
2010-09-26 17:07 ` Jeffrey Carter
2010-09-26 14:52 ` Gene
2010-09-26 15:04 ` Dmitry A. Kazakov
2010-09-26 8:45 ` Stephen Leake
2010-09-26 9:11 ` Niklas Holsti
2010-09-27 1:18 ` Gene
2010-09-28 11:36 ` Stephen Leake
2010-09-29 1:25 ` Gene
2010-09-27 19:23 ` Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox