Iterators/vectors (was: [Biocorba-l] BSANE and bioCORBA)

Antoine van Gelder antoine@egenetics.com
05 Jun 2001 12:34:58 +0200


On 05 Jun 2001 04:16:53 -0400, Brad Chapman wrote:
> Martin:
> >    It depends. If your implementation deals directly with methods from an
> > IDL you must see CORBA anyway, w or w/o anys. But you can make your
> > implementation modular - and let only one module deal with the CORBA world
> > (together with anys) - and the rest is completely CORBA-unaware.
> 
> I tend to agree with Alan on this one. While I do see the point of
> more generic iterators (hell, I don't like writing all of those
> specific iterator classes!), I think that adding any's makes the code
> much more difficult to deal with, especially for those new to
> CORBA. 

It doesn't _have_ to hurt. This is what my implementation of a generic
'any' iterator looks like on the python client side, returning a Seq
object:

iter = factory.getGenericIterator()
  while (1):
    foo, bar = iter.next()
    if (foo != 1) : break
    print bar
    print bar.value.seq() 

 - a