Bug 83

Summary: Allow #includes in the middle of a module or interface declaration
Product: TAO Reporter: Carlos O'Ryan <coryan>
Component: IDL CompilerAssignee: DOC Center Support List (internal) <tao-support>
Status: ASSIGNED ---    
Severity: enhancement    
Priority: P5    
Version: 0.4.2   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 129    

Description Carlos O'Ryan 1999-07-21 21:45:01 CDT
Some users want to define IDL code like this:

// IDL
module Foo
{
#include "one_interface"
#include "another_interface"
};

Though we can argue that writing code like that is a bad idea it wouldn't be
impossible to support. OTOH the user could use M4 or another macro processor to
do the same thing.
This enhacement is recorded mostly for archival purposes
Comment 1 Carlos O'Ryan 1999-07-22 12:22:59 CDT
The enhacements request is accepted, but there is no rush to implement it.
Comment 2 Carlos O'Ryan 1999-08-06 23:20:59 CDT
Another IDL compiler bustage, Jeff comes to the rescue.
Comment 3 Jeff Parsons 1999-08-09 14:06:59 CDT
I accept.
Comment 4 Jeff Parsons 2000-07-11 13:54:12 CDT
To do this, we will have to add an option to generate code for included IDL 
files, because, in the first example below, the included IDL files will not 
compile on their own. The following example will be an easier, and perhaps first 
attempt, use case. It is included here to save the example for testing when this 
bug is addressed.

These were sent in by Richard Reitmeyer <richard@hades.verecomm.com>

#ifndef HUSBAND_IDL
#define HUSBAND_IDL

module TheModule 
{
  interface Husband;
};

#include "d:\jeff\ACE_wrappers\TAO\tests\Bench\local\b.idl"

module TheModule 
{
  interface Husband 
  {
    Wife get_wife();
  };
};

#endif

#ifndef WIFE_IDL
#define WIFE_IDL

module TheModule 
{
  interface Wife;
};

#include "d:\jeff\ACE_wrappers\TAO\tests\Bench\local\a.idl"

module TheModule 
{
  interface Wife 
  {
    Husband get_husband();
  };
};

#endif