comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: hashed_maps
Date: 13 Oct 2005 07:55:31 -0700
Date: 2005-10-13T07:55:31-07:00	[thread overview]
Message-ID: <1129215331.736043.8600@g44g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1129214713.115873.151280@o13g2000cwo.googlegroups.com>


Lucretia wrote:
>
> This is why I'm using a map to map between them, i.e. so I can find the
> Ada instance associated with the C++ instance.

Well, I still don't know what you're doing, but if you need a map then
Ada has those:

ada.containers.hashed_maps
ada.containers.ordered_maps

If you're using GCC 4.0, then you should have these in your path.
Otherwise, you might have to download a reference implementation.

http://charles.tigris.org/

For your problem, either map will do.  Type System.Address has a
relational operator ("<") so you can use that type (or equivalently, an
access type) as the key of the ordered map; or, you can use To_Integer
(declared in package System, or one of its children -- I forget which)
to implement a hash function, and hence use it as the key of the hashed
map.

-Matt




  reply	other threads:[~2005-10-13 14:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 15:58 hashed_maps Lucretia
2005-10-11 17:45 ` hashed_maps Jeffrey R. Carter
2005-10-12 17:04   ` hashed_maps Lucretia
2005-10-13  5:17     ` hashed_maps Matthew Heaney
2005-10-13 14:45       ` hashed_maps Lucretia
2005-10-13 14:55         ` Matthew Heaney [this message]
2005-10-13 15:25           ` hashed_maps Lucretia
2005-10-13 19:47             ` hashed_maps Simon Wright
2005-10-14  4:35               ` hashed_maps Matthew Heaney
2005-10-14  4:41             ` hashed_maps Matthew Heaney
2005-10-17 15:48           ` hashed_maps Lucretia
2005-10-13 20:55 ` hashed_maps Björn Persson
2005-10-13 21:27   ` hashed_maps Robert A Duff
2005-10-14  4:49     ` hashed_maps Matthew Heaney
replies disabled

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