Problem

What are the IDL limitations imposed by the ORBs we are using?

Solution

The implementation of the IDL compilers provided by the ORBs we are using in ACS impose some limitations to the IDL syntax with respect to IDL specifications.

In particular, JacORB imposes quite some restrictions.

What follows is a list of known limitations:

  • It is not allowed to have declarations outside modules, i.e in the top level name space (JacORB). This is in any case deprecated in the IDL specs.
  • It is not allowed to have nested modules. Only one level is allowed. (JacORB problems) See this FAQ.
  • It is not generally allowed to have nested #pragma prefix i.e a prefix like #pragma prefix "ALMA.myprefix" (special cases can be handled, but require being very careful). See this FAQ.
  • JacORB IDL compiler does not recognize:
    #if 0
    always use
    #ifdef CANNOT_BE_DEFINED
  • jacorb has problems handling pre-processor directives within C-style comments in an idl-file.
    The construct:
    /*
    #include <someFile>
    */
    would still try to include someFile whereas:
    // #include <someFile>
    appeared to work.
  • Support for macros from ACS is very limited, since JacORB does not support macros at all. We provide support for macros by pre-processing "by hand" the IDL files with the standard CPP of the GCC compiler but...
  • ...it is possible to define macros in a file and use them somewhere else by including the file with the definition. But as a precaution you shall always put one extra layer of include with guards as described in the FAQ.
  • It is in any case not possible to use macros in an IDL file that have to be included from other IDL files. For the time being the only workaround is to copy by hand the whole content of the file to be included or to merge the two IDL files.
  • In particular it is not possible now to use in one IDL file an ACS_ENUM() defined in another IDL file. We will have to work on that for ACS 3.0. See SPR ALMASW 2003048.