Version 9.5 SP1
 —  Software AG IDL Editor  —

The Software AG IDL Compiler

The Software AG IDL Compiler generates interface objects, skeletons and wrappers. It uses a Software AG IDL file and a template file that controls the generated output.

This document covers the following topics:


Introduction

The IDL Compiler is used to generate stubs, skeletons and wrappers from two specific input files:

The IDL Compiler first reads through the IDL file and builds tables and structures that form an internal representation of the interface. If there is a related client-side server mapping file, it is also read implicitly (see CVM File). The IDL Compiler then loops through this internal representation and uses the template file to generate its output, the source code for the target programming language.

The following wrappers use the IDL Compiler as their generation tool:

The IDL Compiler and the template files for the target programming languages above are fully integrated in the EntireX Workbench. For automation purposes, the IDL Compiler can also be started at the command prompt.

Top of page

Starting the IDL Compiler

Start of instruction setTo start the IDL Compiler

Parameter Description
-help Displays help using the command-line options.
-Doption=value Passes the option to the templates.

See also Using Options.

-Fbasename Indicates that the output file base name follows. It is used as given - thus it should be provided without a path and extension. Only relevant if supported by the template used. Default is the base name of the idl-file without path and extension. See Specifiying the Name of the Output File.
-ttemplate Name of the initial template file.
-Ppreprocessor variable Specifies a preprocessor variable that can be controlled in template files with #ifdef, #elif, #else, and be closed by #endif. Only relevant if supported by the template used. See Using Template #if Preprocessing Statements.
-ooutput-directory Specifies the directory for the output file. See Specifiying the Name of the Output File.
-Ttrace-level
Trace information is entered as comment lines into the generated output.
Trace level Description
0 NO trace output will be created. This is the default trace level.
1 Generates only template file name and the line number in the output file. This trace level helps to identify the specific line in the template file.
2 This is the full tracing mode for the template file. Every action of the IDL Compiler will be displayed.
3 Additional traces for preparation of the output statement will be created.
-deprecated Deprecated mode allows compilation of templates for statements already deprecated. Each deprecated statement will create a warning.
-idlidl-file Name of the IDL file. Multiple IDL files can be provided.

Top of page

IDL Compiler Usage Examples

Calling the IDL Compiler under UNIX

The following applies to the UNIX Bourne, Korn and C shell.

$JAVA_HOME/java -Dsagcommon=/opt/softwareag/EntireX\common\conf -Dentirex.home=$EXXDIR -classpath $EXXDIR/classes/exxidlcompiler.jar:$EXXDIR/classes/saglic.jar com/softwareag/entirex/idlcompiler/TplParser -t $EXXDIR/template/client.tpl -idl aaclient.idl

An erxidl.bsh shell script file is provided with a preconfigured invocation of the IDL Compiler. In addition, the "-deprecated" mode is set as default in this shell script file.

erxidl.bsh -t ...\EntireX\template\client.tpl -idl aaclient.idl

Calling the IDL Compiler under Windows

java -classpath "%ProgramFiles%\software ag\entirex\classes\exxidlcompiler.jar;%ProgramFiles%\software ag\entirex\classes\saglic.jar" "-Dsagcommon=%CommonProgramFiles%\Software AG" com/softwareag/entirex/idlcompiler/TplParser -t ...\EntireX\template\client.tpl -idl aaclient.idl

An erxidl.bat batch file for the Windows command shell is provided with a preconfigured invocation of the IDL Compiler. In addition, the "-deprecated" mode is set as default in this batch file.

erxidl -t ...\EntireX\template\client.tpl -idl aaclient.idl

Top of page

Writing your own Wrappers and Stubs

Additional programming languages can be adopted with user-written templates (see Writing Template Files for Software AG IDL Compiler). The syntax for IDL template files in a formal notation is presented in the section Grammar for IDL Template Files.

Integration with the IDL Editor can be accomplished using the plug-in technique provided (see Using EntireX Custom Wrappers).

Top of page