comp.lang.ada
 help / color / mirror / Atom feed
From: porton@ex-code.com (Victor Porton)
Subject: Re: Booch: missing r/w access through iterators
Date: Thu, 07 Nov 2002 09:21:21 +0500
Date: 2002-11-07T04:30:27+00:00	[thread overview]
Message-ID: <3dc9ec63$0$300$bed64819@news.gradwell.net> (raw)
In-Reply-To: 3dc92622$0$308$bed64819@news.gradwell.net

In article <x7v8z06tzt5.fsf@galadriel.frlngtn.gecm.com>,
	Simon Wright <simon.j.wright@amsjv.com> writes:
> 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?!
> 
> 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.

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;



  parent reply	other threads:[~2002-11-07  4:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 14:18 Booch: missing r/w access through iterators Victor Porton
2002-11-06 16:42 ` Simon Wright
2002-11-07  4:21 ` Victor Porton [this message]
2002-11-07 21:04   ` Simon Wright
2002-11-08 20:49     ` Matthew Heaney
2002-11-08 20:37   ` Matthew Heaney
2002-11-08  5:21 ` Victor Porton
2002-11-08 20:53   ` Matthew Heaney
2002-11-08 20:33 ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox