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-06 09:50:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!uunet!sea.uu.net!sac.uu.net!lore.csc.com!baen1673807.greenlnk.net!baen1673807!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Booch: missing r/w access through iterators Date: 06 Nov 2002 16:42:30 +0000 Organization: Alenia Marconi Systems, ISD, Farlington Sender: sjw@galadriel.frlngtn.gecm.com Message-ID: References: <3dc92622$0$308$bed64819@news.gradwell.net> NNTP-Posting-Host: 20.44.240.10 X-Trace: lore.csc.com 1036604832 6312 20.44.240.10 (6 Nov 2002 17:47:12 GMT) X-Complaints-To: abuse@news.csc.com NNTP-Posting-Date: Wed, 6 Nov 2002 17:47:12 +0000 (UTC) X-Newsreader: Gnus v5.5/Emacs 20.3 X-Original-NNTP-Posting-Host: galadriel.frlngtn.gecm.com X-Original-Trace: 6 Nov 2002 17:46:45 GMT, galadriel.frlngtn.gecm.com Xref: archiver1.google.com comp.lang.ada:30480 Date: 2002-11-06T16:42:30+00:00 List-Id: porton@ex-code.com (Victor Porton) writes: > In Booch generic package BC.Containers there are > function Current_Item which gives read-only access > to the current item. Why a function giving direct > read-write access to the current item (by returning > access to it) is missing?! Actually Current_Item gives you a copy. I think you are looking for generic with procedure Apply (Elem : in out Item); procedure Access_Current_Item (In_The_Iterator : Iterator'Class); -- Call Apply for the Iterator's current Item. (on the line after Current_Item).