[omniORB] Using #include in IDL files

David Morgenlender dmorgen@alum.mit.edu
Wed, 12 May 1999 18:28:34 GMT


On Mon, 10 May 1999 23:40:13 -0500, you wrote:

>I thought a long, long time before replying to this, but the longer I
>looked at it the more it bothered me.
>
>Why would you mix C++ and IDL?  IDL is intended to define a platform and
>language independent interface. =20

Here's one reason why ... I ran into a similar problem with a struct.  =
There are
many parts to this app, which require the struct definition;  some of =
these are
not involved with CORBA.  I want there to be a SINGLE definition of the =
struct;
otherwise, it's a maintenance nightmare.  The struct must be defined =
within the
IDL file;  however, if I #include the .H file, the IDL compiler =
mishandles it,
thinking it must be an interface definition.  So I'm left with the choice=
 of
manually entering the struct definition in the IDL file or using some =
kind of
gross kludge;  either of these choices is ugly!  (BTW, I'm using the =
gross
kludge approach.) =20

My feeling is that if the IDL compiler must require knowledge that an =
include is
of an interface definition, it should also provide a way to do a straight
preprocessor include.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Dave Morgenlender
e-mail: dmorgen@alum.mit.edu
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D