[omniORB] CORBA::Any_var

Duncan Grisby dgrisby@uk.research.att.com
Mon, 14 Jan 2002 11:38:40 +0000


On Friday 11 January, Bruce Visscher wrote:

> Duncan Grisby wrote:
> > No, there's no way to tell if a T_var has been initialised. 
> 
> What's wrong with using CORBA::is_nil?  According to Henning and Vinoski
> (page 261), the default constructor of a T_var initializes the reference
> to a nil reference.  They explicitly show an example using
> CORBA::is_nil(v).

That's talking about _var types for object references. Object
reference _vars are indeed initialised to nil references, so they can
be checked with CORBA::is_nil(). _var types for other types, like
structs and Anys, are initialised with a zero pointer. There is no
function like CORBA::is_nil() for them.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --