ctmidl2cpp (generate C++ stub code)
- Organization of this page
Format
ctmidl2cpp [-h] | [-TSCclient_ext string] [-client_ext string] [-TSChdr_suffix extension-name] [-hdr_suffix extension-name] [-TSCsrc_suffix extension-name] [-src_suffix extension-name] [-TSCroot_dir path-name] [-root_dir path-name] [-TSCsrc_dir path-name] [-TSChdr_dir path-name] [-TSCexport string] [-export string] [-type_code_info]# [-namespace]# [-gen_included_files] [[-I directory[;directory...]]...] [-A] IDL-file
- #
-
This item can be used in an OTMV5 environment only.
Function
This command generates C++ stub code for the OTM client from an IDL file.
Arguments
- -h
-
Displays how to use the command.
- -TSCclient_ext string
-
Specifies the string to be assigned as the name of the file to which client-side code is to be output. The default is _TSC_c.
- -client_ext string
-
Specifies the string to be assigned to the file that will contain the client-part code output by the idl2cpp command. The default is _c.
- -TSChdr_suffix extension-name
-
Specifies the extension of the header file. The default is hh.
- -hdr_suffix extension-name
-
Specifies the suffix of the header file that is output by the idl2cpp command. If this option is omitted, the extension name specified in the -TSChdr_suffix option is used. If neither the -hdr_suffix option nor the -TSChdr_suffix option is specified, the string .hh is used.
- -TSCsrc_suffix extension-name
-
Specifies the extension of the source file. The default is cc.
- -src_suffix extension-name
-
Specifies the suffix of the source file output by the idl2cpp command. If this option is omitted, the extension name specified in the -TSCsrc_suffix option is used. If neither the -src_suffix option nor the -TSCsrc_suffix option is specified, the string .cc is used.
- -TSCroot_dir path-name
-
Specifies the directory to which the source file and header file will be output. If a non-existent directory is specified, it is automatically created.
If you change the output-destination directory, specify the new output-destination directory as an include file search path during compilation.
- -root_dir path-name
-
Specifies the directory to which the source file and header file output by the idl2cpp command will be output.
If you change the output-destination directory, specify the new output-destination directory as an include file search path during compilation.
- -TSCsrc_dir path-name
-
Specifies the directory to which the source file will be output. If a non-existent directory is specified, it is automatically created.
- -TSChdr_dir path-name
-
Specifies the directory to which the header file will be output. If a non-existent directory is specified, it is automatically created.
If you change the output-destination directory, specify the new output-destination directory as an include file search path during compilation.
- -TSCexport string
-
Specifies the export tag for the TSC user proxy. The -TSCexport option is used for a declaration to access classes in a DLL in Windows.
- -export string
-
Specifies the export tag for the stub code that is output by the idl2cpp command. The -export option is used for a declaration to access classes in a DLL in Windows.
- -type_code_info
-
If this option is specified, the command generates the TypeCode information for the data type defined in IDL to the file that will contain the client-side code output by the idl2cpp command. The generated TypeCode information facilitates the handling of the CORBA::Any type.
This option can be used in an OTMV5 environment only.
- -namespace
-
If this option is specified, a module is implemented as a namespace. The module name output as a namespace is not extended in the same way as for the name that is output as a class. The name defined in IDL is retained as is.
This option can be used in an OTMV5 environment only.
- -gen_included_files
-
If this option is specified, the command outputs included IDL definitions.
- -I directory[; directory...]
-
Specifies the include file search paths. In UNIX, to specify multiple search paths, use a colon (:) as a path separator. In Windows, to specify multiple search paths, use a semicolon (;) as a separator. Alternatively, specify the -I option for each search path.
- -A
-
If this option is specified, osagent is not internally started. Specify this option if osagent has already been started on the local host.
- IDL-file
-
Specifies the name of the IDL file to be input. You can omit this option only when you specify the -h option. Make sure that this option is specified at the end of the command line. Also make sure that the extension of the IDL file name is .idl.
Return values
- 0:
-
The command ended normally.
- Other than 0:
-
The command terminated abnormally due to an error that occurred during command processing. Take measures as indicated in the message that is output, and then re-execute the command.
Notes
-
The command behavior partly differs depending on the OTM version.
-
Set the TSCDIR environment variable.
-
Make sure that the shared libraries and commands for TPBroker compatible with the version of the OTM client can be used. If the OTM client is V3, set the directory for TPBroker V3. If the OTM client is V5, set the directory for TPBroker V5.
Table 6‒2: Environment variable settings required for executing the command OTM client
Product that requires the environment variable to be set
OTM V3
OTM V5
TPBroker V3
TPBroker V5
CTM
V3
Y
N
Y
N
Y
V5
N
Y
N
Y
Y
-
For the PATH environment variable, set the paths of the directories that contain the following: osagent, idl2ir, and irep for TPBroker; and tscidl2cpp for OTM.
-
Make sure that a space is entered between an option and its argument.
-
If the IDL file contains definitions that cannot be used for CTM, the command might behave incorrectly or generate an invalid file.
-
During execution of the ctmidl2cpp command, messages might be output by TPBroker and OTM that are used internally.