[omniORB] another module/namespace question

David Byron dbyron@coactive.com
Wed, 13 Jan 1999 12:11:29 -0800


As my search for namespace-aware compilers continues, it appears there are (at least) three levels of namespace support:

1. none
2. as long as the contents of a namespace are declared in exactly one file
3. namespace declarations work even if they in multiple files

I'm working with a compiler that falls into category 2 (MetaWare High C/C++ 4.0a), so I figured I'd structure my IDL files as follows:

master.idl
----------
module my_module
{
#include <interface1.idl>
#include <interface2.idl>
#include <interface3.idl>
...
};

instead of having module my_module inside each IDL file.

I figured omniidl would create a stub file master.hh with something like:

_CORBA_MODULE my_module
_CORBA_MODULE_BEG

#include <interface1.hh>
#include <interface2.hh>
#include <interface3.hh>
...

_CORBA_MODULE_END

Unfortunately, the actual master.hh that's generated looks something like:

#include <interface1.hh>
#include <interface2.hh>
#include <interface3.hh>

_CORBA_MODULE my_module
_CORBA_MODULE_BEG

_CORBA_MODULE_END

Is my solution a valid one?  Should I change the IDL compiler to do what I want?

Thanks for your help.

-DB
---
David Byron                     dbyron@coactive.com
Coactive Networks, Inc.         http://www.coactive.com
4000 Bridgeway, Suite 303       voice:(415)289-1722
Sausalito, CA  94965            fax:(415)289-1320