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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f4a284296951c45f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Loosing tagged type via linked list Date: Sat, 09 Feb 2008 11:40:35 +0000 Organization: Pushface Message-ID: References: <47ad2289$0$370$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1202557236 20479 62.49.19.209 (9 Feb 2008 11:40:36 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 9 Feb 2008 11:40:36 +0000 (UTC) Cancel-Lock: sha1:mQtjtuZ1j+lFs3UTZ+RvQ0ATREY= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) Xref: g2news1.google.com comp.lang.ada:19750 Date: 2008-02-09T11:40:35+00:00 List-Id: Georg Bauhaus writes: > jason.height@gmail.com wrote: >> I am attempting this in Ada95, with my own Linked_List container impl, >> which seems to be destroying the type information. If anyone knows a >> Ada95 list implementation that can store items of different types >> (derived from a base type) then please let me know. > > The Booch components will let you do this, using indefinite > generic formal types. > http://sourceforge.net/project/showfiles.php?group_id=135616. If you want to use a definite formal type, then access-to-classwide is what you need (there will have to be an access under the hood, whatever solution you adopt). type A_Type_P is access A_Type'Class; Allocation and, more challengingly perhaps, deallocation are then up to you. > (The WiKi seems out of order at this time; doc is contained in > an accompanying archive.) So it is. First time I've heard! Can't be visited very often ...