From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1ea92c0e5255811d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-27 09:19:52 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Container libraries Date: 27 Feb 2003 09:19:51 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0302270919.251940be@posting.google.com> References: <5d6fdb61.0302250317.c49d71a@posting.google.com> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1046366392 3977 127.0.0.1 (27 Feb 2003 17:19:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 27 Feb 2003 17:19:52 GMT Xref: archiver1.google.com comp.lang.ada:34678 Date: 2003-02-27T17:19:52+00:00 List-Id: "Martin Krischik" wrote in message news:... > > I am using AdaSL components. They work quite well for me. As for > Multitasking, I have added my own (see adacl.sf.net). > > Still, I am starting to miss some form of access by key. Charles has maps, which allow access by an arbitrary key. There is also a special map container for keys of type String. There are both sorted and hashed versions. There are also multimaps, which allow multiple elements to have the same key. The Equal_Range operation returns an iterator pair that designates the range of equivalent keys. Sets are similar, in that the element is its own key. http://home.earthlink.net/~matthewjheaney/charles/ All the containers are sequential -- there is no built-in support for concurrency. However, it is trivial for a client to add such support, e.g. Map : Map_Subtype; Map_Semaphore : aliased Semaphore_Type; procedure Lookup (Key : Key_Subtype) is Lock : Semaphore_Control_Type (Map_Semaphore'Access); I : constant Iterator_Type := Find (Map, Key); begin if I /= Back (Map) then ... end Lookup; That is one way to implement support for concurrency. There are many other ways.