CORBA 2.6.1 Programmer's Guide for C++

documentation for further information.
The default preprocessor invoked by the IDL compiler is called
cfe. You can use the -preprocessor flag to specify a different preprocessor to
be invoked by the IDL compiler.
To use the default preprocessor, the directory containing cfe must be in the PATH environment variable. For example, to use the /usr/lib/cfe
preprocessor, execute the following command from the command line or add it to your OSS .profile or env.sh file:
export PATH=”$PATH:/usr/lib”
Note:
If you change your
.profile file, be sure to source it in for the changes to take effect.
IDL Compiler Syntax
nsdidl Compiler Syntax
The following line is the command-line syntax for running the IDL compiler. The IDL compiler is invoked with the -language C++ option to
generate C++ code. You can display help text by using the
-? option.
For example, to invoke the compiler to generate C++ bindings, type the following command:
nsdidl -language C++ idlfile1[, idlfile2 ]...
Preprocessor Options
-D name
Define name as a macro, with definition '1'. This option is the same as if the -D name=1 option is used.
-D name=definition
Define name as a macro, with definition as the definition.
-I dir
Insert the specified directory name into the search path for #include files with names not beginning with a slash (/). dir is inserted
ahead of the standard list of include directories. You can specify
dir more than once to add multiple directories to the search path. The
default is the current directory.
-U
Remove any definition of name (overrides any -D in the command line no matter where it appears).
IDL Code-Generation Options
-client qualifier
Specify the file name qualifier for generated client-side header and C++ source files. This client-side file name qualifier is appended to
the base IDL filename with an intervening underscore. The default is
client.
-generate arg
Generate code corresponding to arg. Prefixing arg with no- reverses the sense of the option. By default, args are set to off, but for new
code you should set them on.
arg can be any of the following:
all-includes
Specifies code generation for all included files, even if the IDL file name is not specified on the command line. Prefixing this arg
with no- specifies code generation for IDL files included by top-level #include directives only if the IDL file name was specified on
the command line. The default is
no-all-includes.
tie
Generate code to enable the tie or delegation mechanism. In addition to generating a skeleton class, the IDL compiler generates
a delegating class called a tie. This class is partially opaque to the application programmer, though like the skeleton, it provides a
method corresponding to each OMG IDL operation. The name of the generated tie class is the same as the generated skeleton
class with the addition that the string
_tie is appended to the end of the name.
-h suffix
Specify the file suffix used for generated C++ header files. By default h is used for C++ header files.
-include level
The parameter level can be 0, 1, 2, ... The level specifies the maximum number of pathname components passed through in a C++
include statement for
#include directive pathnames. The default behavior is to include the full pathname. Given the header file
/usr/app/idltest/t1_client.h, the -include 2 option generates the #include directive:
#include “idltest/t1_client.h”
and the -include 1 option generates:
#include “t1_client.h
If
level equals 0, the full pathname is generated. If level is more than the number of directories in the path, the full path is generated.
-ir
Generate an Interface Repository (IR) from the input IDL (the existing IR definitions are updated). The default is off.
-IR
Generate an Interface Repository (IR) from the input IDL (the existing IR definitions are replaced). Useful if you use Dynamic
Invocation Interface (DII). The default is off.