[omniORB] typecode question
David Riddoch
djr@orl.co.uk
Thu, 19 Nov 1998 10:52:59 +0000 (GMT)
On Wed, 18 Nov 1998, David Byron wrote:
> Just wondering if anyone knows why TypeCode::member_type() is restricted
> to complex types? Wouldn't it be OK to return a simple type if that's
> what the TypeCode represented? It would make it easier for my
> application, and maybe others, to not have to check the type so often...
Yes it would be possible, but no we don't think it would be a good idea.
The spec (CORBA 2.2, 8.7) clearly states that member_type() method may
only be invoked on a structure (inc exception) or union TypeCode - so it
is an error to invoke it otherwise.
For most people's applications it is much more important to catch errors
of this kind than to use some ORB-specific hack that saves a few
key-presses.
Sorry!
David