CPP 1.3 NO IDEA Avatar
  1. OMG Issue

CPP13 — portable includes

  • Key: CPP13-11
  • Legacy Issue Number: 2253
  • Status: open  
  • Source: Anonymous
  • Summary:

    Summary: We all know that the names of the C++ #include files generated from IDL are
    not standardized, and are thus the one remaining major source portability
    issue. One way to fix this would be to agree on some standard filenames,
    but we"ve tried this before and have never succeeded.

    Just thinking out loud here, but another way to fix it would be to agree on
    some standard macro names that applications could use to portably include
    the appropriate files. For example, define one macro for a client-side
    include and one macro for a server-side include, both taking the basename
    of the IDL file as an argument:

    #ifndef CORBA_CXX_CLIENT_INCLUDE
    #define CORBA_CXX_CLIENT_INCLUDE(base) <base ## Client.hh>
    #endif

    #ifndef CORBA_CXX_SERVER_INCLUDE
    #define CORBA_CXX_SERVER_INCLUDE(base) <base ## Server.hh>
    #endif

    Obviously, the exact definition of the macro would depend on the names of
    the generated files.

    I believe these could then be used portably in the client and server source
    code like this:

    #include CORBA_CXX_CLIENT_INCLUDE(file)

    With this approach, nobody has to change the names of the files they
    currently generate.

  • Reported: CPP 1.0b1 — Mon, 14 Dec 1998 05:00 GMT
  • Updated: Fri, 6 Mar 2015 20:57 GMT