[omniORB] unifying same/different stub/skeleton header names

Alexy Khrabrov alexy.khrabrov@setup.org
Wed Aug 14 19:32:01 2002


I'm developing my CORBA application so it would
work with several ORBs, including MICO, omniORB,
and TAO, for starters.  An interesting question is
how you do ORB-independent #include's.  Each ORB
seems to have its Property Service and Naming
Service header in different place, so I have a
file called C_NamingService.h with something like

#if defined(_MICO_)
#include <mico/CosNaming.h>
#elif defined(_TAO_)
#include <orbsvcs/CosNamingC.h>
#endif

Now, that's pretty standard wrapping, described in
"Advanced CORBA Programming with C++."  But they
also recommend to use the ORBs IDL compiler's
options to produce stub and skeleton headers, and
bodies, with the same names, across different
ORBs.

Here's an interesting part: ORBs like TAO generate
different stub and skeleton headers, e.g. someC.h
for client and someS.h for server.  MICO, however,
generates just some.h.  So looks like you're
forced to use two of the above wrapper header,
e.g. C_someC.h and C_someS.h, with the former
containing

#if defined (_MICO_)
#include "some.h"
#elif defined(_OMNI_)
#include "some.hh"
#elif defined(_TAO_)
#include "someC.h"
#endif

(I could configure omniORB to produce some.h as
well, but TAO has different client and server
headers someC.h and someS.h anyways.)

If we could always have the same someC.h and
someS.h header names, we wouldn't need those extra
wrappers.  In order to do it in MICO and omniORB,
it would be nice to have an option to generate the
two files with the same names, or maybe a
(sym)link, or I can do a wrapper script to do
it.

Any other solutions used by anybody to standardize
header names in this situation, where
stub/skeleton name may be both same or different
for different ORBs without extra wrappers?

Cheers,
Alexy