[omniORB] Echo *echoPtr vs. Echo_ptr echoPtr

Janet Tvedt tvedt@noao.edu
Mon, 23 Oct 2000 12:05:10 -0700 (MST)


I am in the process of upgrading from omniORB version 2.8.0
to version 3.0.2.  I am wondering why pointer declarations
no longer work.  What is the fundamental difference between
Echo *echoPtr and Echo_ptr echoPtr?

I changed the echo example eg3_clt.cc to use a * instead of
the _ptr as follows:
  Echo *echoPtr = Echo::_nil();

and I get the following compilation error:
  eg3_clt.cc:53: type `Echo' is not a base type for type `_objref_Echo'

I ask because I am porting lots of code that uses the * version
and a general name resolution template function that has a
parameter Type ** as shown below: 
   template <class Type> 
   int getCosNamingObjectRef(Type **a, ...

This function generically performs the name resolution and narrowing,
returning the object reference as parameter.  I assume this would
work fine with a _ptr type as a return value.  However, the function
is used everywhere and it would be a pain to change it now.  

Is there anyway to get around this?

Thanks.

--------------------------------------------------------------------------
Janet Tvedt, National Solar Observatory/SOLIS   Internet: tvedt@noao.edu
P.O. Box 26732, Tucson, AZ  85732-6732          Phone:    (520) 318-8388
950 N. Cherry Ave., Tucson, AZ  85719           FAX:      (520) 318-8278