Show TOC Start of Content Area

Procedure documentation Generating C++ Code for the Notificator Object  Locate the document in its SAP Library structure

Use

Using the idl compiler provided by your ORB software vendor, you must compile the Notificator object into C++ files. We will use the ORBacus ORB software in our example.

Note

In the Procedure section below, we describe the steps for generating the C++ code for the Notificator object using the syntax and options provided by the idl tool from ORBacus. If you are using a different ORB software, you must find out which tools to use and familiarize yourself with their syntax and the options provided.

When choosing the options that you will run with the command that generates the C++ files, bear in mind that you must also generate communication support files for the Notificator object (such as skeletons), as well as sample implementation files for it. With this sample implementation, you will later only need to add few lines of code to complete the implementation of the callback object.

Prerequisites

You must have installed the appropriate ORB software on your machine so that you can use its tools to generate C++ files out of the IDL ones.

Procedure

Execute the idl.exe file that is located in the <orbacus_ dir>\bin directory on your machine against the Notificator.idl file. Provide the following options with the command:

·        Use the --impl option to generate a sample implementation file for the Notificator object.

·        Use the --output-dir to specify the directory where the generated C++ files are to be saved.

Note

Make sure that you specify an existing directory in the directory path you specify with this option. If your path includes a non-existing directory, the tool will not create one, rather it will generate an error and the C++ files generation will fail.

·        Use the –I<dir> option to include paths to directories that you want to be available to the tool to search for files in. You can use the –I<dir> option several times on a single command line if you need to specify several paths. For our example, you need to include the following directories:

¡        <orbacus_dir>\idl directory;

¡        <orbacus_dir>\idl\OB directory;

·        Enter the full directory path to the Notificator.idl file (including the filename itself) to tell the idl tool which IDL file to run against.

Result

You have the following C++ files generated in the directory that you specified in the --output-dir option of the idl command:

·        Notificator.cpp

·        Notificator.h

·        Notificator_impl.cpp

·        Notificator_impl.h

·        Notificator_skel.cpp

·        Notificator_skel.h

The Notificator_impl.cpp file is the sample implementation of the Notificator object that is generated by the idl tool. Later on, you will have to add few lines of code to this file to complete its implementation.

Next Step:

Generating C++ Code for the Rest of the CallbackApplication Classes

 

End of Content Area