[omniORB] CORBA::Any_var
Ken Feuerman
kfeuerma@adobe.com
Fri, 11 Jan 2002 08:34:37 -0800
What about making use of the TypeCode somehow? Something along the lines of
CORBA::Any_var a;
CORBA::TypeCode_var tc = a->type(); // not sure if "TypeCode_var" is an
official mapping?
if (tc->kind() == tk_null)
cout << "The Any_var has not been initialized" << endl;
--Ken Feuerman.
Adobe Systems, Inc.
At 10:49 AM 1/11/2002 +0000, Duncan Grisby wrote:
>On Friday 11 January, =?iso-8859-1?Q?Andr=E9n_Clas?= wrote:
>
> > I've got a CORBA::Any_var stored as a member variable and in my
> > application I want to test if this CORBA::Any_var has been supplied a
> > value (for example new CORBA::Any()). For this case, does CORBA offer
> > any method similar to the CORBA::is_nil() method for NULL testing a _ptr
> > variable ????
>
>There's no nice function to do it, but you can use a side-effect of
>the Any_var mapping:
>
> CORBA::Any_var a;
>
> if (a.operator->() == 0) {
> cout << "The Any_var has not been initialised" << endl;
>
>Cheers,
>
>Duncan.
>
>--
> -- Duncan Grisby \ Research Engineer --
> -- AT&T Laboratories Cambridge --
> -- http://www.uk.research.att.com/~dpg1 --