[omniORB] Another dumb question

Duncan Grisby dgrisby@uk.research.att.com
Wed, 01 Aug 2001 12:00:18 +0100


On Wednesday 1 August, Adam Cassar wrote:

[ Fixing the top-posing so it makes sense... ]

> On Wed, Aug 01, 2001 at 01:41:48PM +0300, Andrew Weaver wrote:
> > How can I test for a null Object Id as returned by 
> > 
> > AnObjId = PortableServer::string_to_ObjectId("FredResMgr"); 
>
>  if( CORBA::is_nil( AnObjId))
> 	 cerr << "eatme!" << endl;

No. string_to_ObjectId() returns an ObjectId*, so you can test it for
null just with AnObjId == 0. However, since string_to_ObjectId never
returns null, it's a pretty pointless thing to be doing.

Cheers,

Duncan.

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