Discussion:
[omniORB] Regarding Datatype in C++
Rajesh Khan
2011-12-16 07:25:37 UTC
Permalink
Hi is there anyway to quickly familiarize with the datatypes being used .
It gets confusing sometimes for example
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
CORBA::Object_var obj = getObjectReference(orb); //orb is of type
CORBA::ORB_var

However its being passed to a function which requires CORBA::ORB_ptr
static CORBA::Object_ptr getObjectReference(CORBA::ORB_ptr orb)
{...... }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20111215/95d6b685/attachment.htm
Brian Neal
2011-12-16 07:30:12 UTC
Permalink
Hi is there anyway to quickly familiarize with the datatypes being used . It
gets confusing sometimes for example
??? ??? CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
??? ??? CORBA::Object_var obj = getObjectReference(orb);? //orb is of type
CORBA::ORB_var
However its being passed to a function which requires CORBA::ORB_ptr
static CORBA::Object_ptr getObjectReference(CORBA::ORB_ptr orb)
That's the correct way to do it.

The IDL to C++ mapping is very difficult and can't really be explained
over a mailing list. You can download a copy of the mapping from the
OMG website. You should also get the book: Advanced CORBA Programming
with C++ by Henning & Vinoski. That book is really not optional if you
are going to try to learn CORBA in C++.

-BN

Loading...