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,d2ded6de39562f0e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-23 15:29:30 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail From: "Des Walker" Newsgroups: comp.lang.ada Subject: Re: Instantiating a generic ADT from another ADT Date: Mon, 23 Apr 2001 23:29:04 +0100 Message-ID: <9c26rp$42v$1@newsg4.svr.pol.co.uk> References: <3ae388e0@duster.adelaide.on.net> <3AE39790.6E337130@acm.org> <3ae39c1c@duster.adelaide.on.net> NNTP-Posting-Host: modem-76.foxface.dialup.pol.co.uk X-Trace: newsg4.svr.pol.co.uk 988061369 4191 62.137.15.76 (23 Apr 2001 21:29:29 GMT) NNTP-Posting-Date: 23 Apr 2001 21:29:29 GMT X-Complaints-To: abuse@theplanet.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Xref: newsfeed.google.com comp.lang.ada:6869 Date: 2001-04-23T21:29:29+00:00 List-Id: Alex Angas wrote in message news:3ae39c1c@duster.adelaide.on.net... > Ah sorry, yeah Hash_Table.Hash_Table_List is private. > > Any suggestions as to how best to implement this? I don't mind if I have to > change the whole thing!! > > Alex. > > "Jeffrey Carter" wrote in message > news:3AE39790.6E337130@acm.org... > > Without knowing the definition of Hash_Table_Entry I can't be sure this > > is the only problem, but Hash_Table.Hash_Table_List is private, while > > Hash_Table.Hash_Table_List_Package.Item_List is limited private, so the > > full definition of Hash_Table_List cannot be "new > > Hash_Table_List_Package.Item_List". > > > > -- > > Jeff Carter > > "We call your door-opening request a silly thing." > > Monty Python & the Holy Grail > > Hi, This isn't an answer to your question about ADTs, but in consideration of your statement that you don't mind changing the whole thing. If this doesn't interest you then apologies for taking this thread off topic. If you're looking for code to handle generic lists have you tried using the Booch Components. The BCs were initially developed for C++, but there are ports to Ada, and Eiffel and I think I've seen a Java port. As well as support for lists, the BCs also provide provide support for "Bags, Collections, Deques, Graphs, ... , Maps, Queues, Rings, Sets, Stacks, and Trees". The Booch Components have been around for a numer of years now, although I haven't used them to a great extent yet. I did try out the AVL Tree - I found the performance when managing a million items was on a par with a well vetted C version of the AVL tree I obtained of the net. The Ada port isn't as complete as the C++ version, but is still being maintained. You can download a copy of the Booch Components from http://www.pogner.demon.co.uk/components/bc/index.html The download comes with a set of test programs which give guidance on how to use the component packages. HTH Des Walker