omniidl [options] -b<back-end> [back-end options] <file 1> <file 2> ...
-bback-end | Run the specified back-end. For omniORBpy, use -bpython. |
-Dname[=value] | Define name for the preprocessor. |
-Uname | Undefine name for the preprocessor. |
-Idir | Include dir in the preprocessor search path. |
-E | Only run the preprocessor, sending its output to stdout. |
-Ycmd | Use cmd as the preprocessor, rather than the normal C preprocessor. |
-N | Do not run the preprocessor. |
-T | Use a temporary file, not a pipe, for preprocessor output. |
-Wparg[,arg...] | Send arguments to the preprocessor. |
-Wbarg[,arg...] | Send arguments to the back-end. |
-nf | Do not warn about unresolved forward declarations. |
-k | Keep comments after declarations, to be used by some back-ends. |
-K | Keep comments before declarations, to be used by some back-ends. |
-Cdir | Change directory to dir before writing output files. |
-d | Dump the parsed IDL then exit, without running a back-end. |
-pdir | Use dir as a path to find omniidl back-ends. |
-V | Print version information then exit. |
-u | Print usage information. |
-v | Verbose: trace compilation stages. |
interface I; interface J { attribute I the_I; };then omniidl will normally issue a warning:
test.idl:1: Warning: Forward declared interface `::I' was never fully definedIt is illegal to declare such IDL in isolation, but it is valid to define interface I in a separate file. If you have a lot of IDL with this sort of construct, you will drown under the warning messages. Use the -nf option to suppress them.
interface I { void op1(); // A comment void op2(); };the -k flag will attach the comment to op1(); the -K flag will attach it to op2().
-Wbstdout | Send the generated stubs to standard output, rather than to a file. |
-Wbinline | Output stubs for #included files in line with the main file. |
-Wbglobal=g | Use g as the name for the global IDL scope (default _GlobalIDL). |
-Wbpackage=p | Put both Python modules and stub files in package p. |
-Wbmodules=p | Put Python modules in package p. |
-Wbstubs=p | Put stub files in package p. |
// example_echo.idl module Example { interface Echo { string echoString(in string mesg); }; };omniidl generates directories named Example and Example__POA, which provide the standard Python mapping modules, and also the file example_echo_idl.py which contains the actual definitions. The latter file contains code which inserts the definitions in the standard modules. This arrangement means that it is not possible to move all of the generated code into a Python package by simply placing the files in a suitably named directory. You may wish to do this to avoid clashes with names in use elsewhere in your software.
omniidl -bpython -Wbpackage=generated echo_example.idlcreates a directory named `generated', containing the generated code. The stub module is now called `generated.Example', and the actual stub definitions are in `generated.example_echo_idl'. If you wish to split the modules and the stub definitions into different Python packages, you can use the -Wbmodules and -Wbstubs options.
omniidl -bpython a.idlAs above, but put the stubs in a package called `stubs':
omniidl -bpython -Wbstubs=stubs a.idlGenerate both Python and C++ stubs for two IDL files:
omniidl -bpython -bcxx a.idl b.idlJust check the IDL files for validity, generating no output:
omniidl a.idl b.idl