Porting Orbix specific code to omniORB.

Edward Scott Edward.Scott@prismtech.co.uk
Mon, 11 Aug 1997 18:24:02 +0100


The follow is an excerpt from some code which does what you trying to
do:

   CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv,"omniORB2");
   CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA");

// more code ...

#if defined OMNIORB
   PT_Persistence::PersistentStore_var myRef = store->_this();
   CORBA::String_var p = orb->object_to_string(myRef);
#elif defined ORBIX
   CORBA::Orbix.setServerName ("PersistentStore");
   char *p = CORBA::string_dupl(
      store->
         _object_to_string(CORBA::IT_INTEROPERABLE_OR_KIND));
// more code...

As you can see you need to invoke object_to_string on an instance
of CORBA::ORB.

Regards,

Edward

Niels Basjes wrote:
> 
> Hi,
> 
> I have some code here which was written using the Orbix specific
> function CORBA::Object::_object_to_string().
> This was done to obtain a unique ID for an object.
> 
> What I'm trying to do is port this code to work with omniORB2.
> 
> I know that the CORBA compliant version is
> CORBA::ORB::object_to_string(Object_ptr)
> 
> I've tried giving the mentioned class a member function
> that does "return CORBA::ORB::object_to_string(this);" but that didn't
> work (compiler errors).
> 
> Can anyone give me hint or solution how I can port this the easiest way ??
> 
> Regards,
> 
> Niels Basjes
> 
> ================================================================
> | ir. Niels Basjes             | National Aerospace Laboratory |
> | Phone      : +31-20-5113626  | Anthony Fokkerweg 2           |
> | E-Mail@NLR : Basjes@NLR.nl   | 1059 CM Amsterdam             |
> | E-Mail@Home: Niels@Basjes.nl | The Netherlands               |
> ================================================================

-- 
-----------------------------------------------------------------------
Edward Scott ................Prism Technologies Ltd., Kingfisher House,
http://www.prismtech.co.uk ..Kingsway, Tyne & Wear, NE11 0JQ, England
Edward.Scott@prismtech.co.uk Tel +44(0)1914913983 Fax +44(0)1914913973