comp.lang.ada
 help / color / mirror / Atom feed
From: porton@ex-code.com (Victor Porton)
Subject: Re: Missing in Booch: range operations
Date: Sat, 09 Nov 2002 21:12:57 +0500
Date: 2002-11-09T17:35:02+00:00	[thread overview]
Message-ID: <3dcd4746$0$301$bed64819@news.gradwell.net> (raw)
In-Reply-To: 3dcb8eec$0$307$bed64819@news.gradwell.net

In article <x7vr8duzvba.fsf@smaug.pushface.org>,
	Simon Wright <simon@pushface.org> writes:
> porton@ex-code.com (Victor Porton) writes:
> 
>> generic
>>   For_Container: in out Containers_Library.Container_Type;
>> package Container_Instance is
>>   Container: Containers_Library.Container_Type renames For_Container;
>>   type Iterator is new Containers_Library.Iterator;
>>   function New_Iterator return Iterator;
>> end;
> 
> I don't at first see how to do this in the BCs, where the
> Container_Type and Iterator (BTW, if you are going to say
> Container_Type, eew, why not Iterator_Type?) are abstract ..
> 
> but there would be no point anyway unless I make the major change of
> supporting the STL/Charles view of iteration, and the likelihood of
> that is minimal.

I don't understand what is "the STL/Charles view of iteration" and
why you don't want add my code.

In the first letter I've written just a rough template (for both
Booch and Charles) which is something like Booch, but not Booch.
Now the code for Booch (not checked for errors!):

generic
  For_Container: in out BC.Containers.Container'Class;
package BC.Containers.Container_Instance is
  Container: BC.Containers.Container'Class renames For_Container;
  type Iterator is new BC.Containers.Iterator;
  function New_Iterator return Iterator'Class;
end;

generic
  For_Container: in out BC.Containers.Container'Class;
package body BC.Containers.Container_Instance is
  function New_Iterator return Iterator'Class is
  begin
    return Iterator'Class(BC.Containers.New_Iterator(Container));
  end;
end;



  parent reply	other threads:[~2002-11-09 16:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 10:09 Missing in Booch: range operations Victor Porton
2002-11-08 15:01 ` Stephen Leake
2002-11-08 21:07 ` Matthew Heaney
2002-11-09 13:56   ` Simon Wright
2002-11-13 20:17     ` Matthew Heaney
2002-11-08 21:35 ` Matthew Heaney
2002-11-09  8:24 ` Victor Porton
2002-11-13 20:22   ` Matthew Heaney
2002-11-13 22:28     ` Stephen Leake
2002-11-09  8:46 ` Victor Porton
2002-11-09 14:12   ` Simon Wright
2002-11-09 14:04 ` Simon Wright
2002-11-09 16:12 ` Victor Porton [this message]
2002-11-09 20:00   ` Simon Wright
2002-11-11  5:41 ` Victor Porton
2002-11-11  6:39   ` Simon Wright
2002-11-11  7:50 ` Victor Porton
2002-11-13 20:26   ` Matthew Heaney
2002-11-13 22:28     ` Stephen Leake
replies disabled

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