comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <matsw@bluewin.ch>
Subject: Re: ANN: Simple components v 1.3
Date: Thu, 15 Jan 2004 17:22:33 +0100
Date: 2004-01-15T17:22:33+01:00	[thread overview]
Message-ID: <matsw-E5F2FF.17223315012004@sicinfo.epfl.ch> (raw)
In-Reply-To: 629d00tlqvu326hi1vsomlmnvkobvbc0bl@4ax.com

In article <629d00tlqvu326hi1vsomlmnvkobvbc0bl@4ax.com>,
 Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:

>Isn't it same as to have just set rather than map? I have Generic_Set:
>
>generic
>   type Object_Type is private;
>   Null_Element : Object_Type;
>    ...
>   with function "<" (Left, Right : Object_Type) return Boolean is <>;
>   with function "=" (Left, Right : Object_Type) return Boolean is <>;
>package Generic_Set is

I think not, because with maps, you have to be able to extract an item 
given its key, which you cannot do with Generic_Sets as there is no key 
type. Following is the function that does that in my package:

   function Search (Key : Key_Type; Within : Bag) return Item_Type;
      -- Returns the first item in FROM that has a key equal to KEY.
      -- NONEXISTENT_KEY will be raised if no such item is
      -- found in the bag.



  reply	other threads:[~2004-01-15 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-03 17:17 ANN: Simple components v 1.3 Dmitry A. Kazakov
2004-01-14 12:06 ` Preben Randhol
2004-01-14 13:15   ` Dmitry A. Kazakov
2004-01-15 14:01     ` Mats Weber
2004-01-15 15:04       ` Dmitry A. Kazakov
2004-01-15 16:22         ` Mats Weber [this message]
2004-01-15 18:18           ` Jeffrey Carter
2004-01-16  9:49           ` Dmitry A. Kazakov
replies disabled

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