Bug 83 - Allow #includes in the middle of a module or interface declaration
Summary: Allow #includes in the middle of a module or interface declaration
Status: ASSIGNED
Alias: None
Product: TAO
Classification: Unclassified
Component: IDL Compiler (show other bugs)
Version: 0.4.2
Hardware: All All
: P5 enhancement
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks: 129
  Show dependency tree
 
Reported: 1999-07-21 21:45 CDT by Carlos O'Ryan
Modified: 2018-01-15 11:21 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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