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,1c4bf3a1bd5d40f3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 12:37:25 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Booch: missing r/w access through iterators Date: 8 Nov 2002 12:37:25 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0211081237.6db8d845@posting.google.com> References: <3dc92622$0$308$bed64819@news.gradwell.net> <3dc9ec63$0$300$bed64819@news.gradwell.net> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1036787845 7420 127.0.0.1 (8 Nov 2002 20:37:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 8 Nov 2002 20:37:25 GMT Xref: archiver1.google.com comp.lang.ada:30607 Date: 2002-11-08T20:37:25+00:00 List-Id: porton@ex-code.com (Victor Porton) wrote in message news:<3dc9ec63$0$300$bed64819@news.gradwell.net>... > > I noticed Access_Current_Item, but with it to gain such access one > needs to create a new procedure! Too bad. I want direct access like: > > function Current_Item_Access(It: Iterator'Class) return Item_Access; The Charles library does indeed have such a function: generic type Element_Access is access all Element_Type; function Generic_Element (Iterator : Iterator_Type) return Element_Access; This allows you to do this: function To_Access is new Generic_Element (...); declare E : Element_Subtype renames To_Access (Iterator).all; begin end; The library is hosted at my web page: http://home.earthlink.net/~matthewjheaney/charles/index.html