[omniORB] Returning None Where Structs Are Required
Stefan Seefeld
seefeld@sympatico.ca
Tue, 29 May 2001 09:23:20 -0500
"Gary D. Duzan" wrote:
> The CORBA/IDL model doesn't allow for null structs. The two
> alternatives that sprint to mind would be to throw an exception
> when you hit the end of the iteration, or always return a sequence
> of structs, leaving it empty if there is no more data.
I would strongly suggest to use the de-facto iterator API that is already
used elsewhere (for example in the Naming Service). I.e. something like
interface Iterator
{
boolean next_one (out Item i);
boolean next_n (in unsigned long how_many, out ItemSeq is);
void destroy ();
};
since programmers will recognize it and know how to use it.
Regards,
Stefan