[omniORB] Re: #include in .IDL file works incorrectly!!!

David Morgenlender dmorgen@alum.mit.edu
Thu, 14 Jan 1999 21:44:36 GMT


One other thing I've tried, which doesn't provide a solution ... use =
#define's
instead of the typedef & to override the struct's name.  The IDL compiler=
 seems
to use the #define when reading the #include'd file.  However, it doesn't=
 put it
into the .HH file.  So any C++ source file #include'ing the .HH file, =
thinking
this will provide definitions for the CORBA stuff will be disappointed =
when it
comes to the struct ... it won't have the overridden name & type;  the =
solution
is to provide redundant #define's (or perhaps in a #include ... assuming =
the IDL
compiler doesn't have problems with this ... which it probably will by
generating a #include for a non-existent .HH file).  Actually, the C++ =
file,
which #include's the .HH file will not compile because of the #include =
created
for a non-existent .HH file!

BTW, I just confirmed that this approach works on the COM side, except =
for the
struct being defined outside the interface.  However, a #define works
appropriately (i.e. the IDL compiler applies it to the struct definition =
code
being generated), so it can be used to specify a unique struct name.

=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