[omniORB] Pointer from a _var?
Wilson Jimmy - jiwils
Jimmy.Wilson@acxiom.com
Wed, 20 Jun 2001 12:11:54 -0500
The standard way to do it is to use CORBA::is_nil(ObjectRef). When you
initialize your _var pointers, initialize them using
ObjectNamespace::ObjectName::_nil() to return a NULL/nil object reference to
your _var pointer. The reason you want to do this is twofold:
#1) NULL (and the concept of pointers) isn't available in all languages, so
how would that translate across the wire? nil solves that.
#2) Since your _var pointers will clean themselves up, setting them to NULL
could cause an access violation when the objects references are cleaned up
depending on what happens.
Jimmy
--
James "Jimmy" Wilson
Software Developer, Acxiom Corporation
-----Original Message-----
From: Bruce Fountain [mailto:B_Fountain@motherwell.com.au]
Sent: Wednesday, June 20, 2001 4:36 AM
To: omniorb-list@uk.research.att.com
Subject: [omniORB] Pointer from a _var?
I will probably kick myself for this, but I can't
work out how access the pointer associated with a
_var type. For instance, if I have an _var reference
to a sequence of strings, how do I determine whether
the pointer is NULL?
With ORBacus I could just compare the value against
NULL, but this doesn't seem to work with omni, so I
guess I have wandered into the world of proprietory
extensions again.
Bruce Fountain
Mi Consulting Group (Australia) Pty Ltd
Direct Line: +61 (0)8 9368 8607
Switchboard: +61 (0)8 9368 8600
Facsimile: +61 (0)8 9368 8699
E-mail: b_fountain@motherwell.com.au