10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Invoking the OTT Utility<br />

userid Parameter Specifies the database connection information that the OTT utility<br />

will use. In both of the preceding examples, the OTT utility attempts to connect<br />

with username scott and password tiger.<br />

intype Parameter Specifies the name of the INTYPE file. In both of the preceding<br />

examples, the name of the INTYPE file is specified as demoin.typ.<br />

outtype Parameter Specifies the name of the OUTTYPE file. When the OTT utility<br />

generates the header file, it also writes information about the translated types into<br />

the OUTTYPE file. This file contains an entry for each of the types that is translated,<br />

including its version string, and the header file to which its C or <strong>C++</strong> representation<br />

is written.<br />

In both of the preceding examples, the name of the OUTTYPE file is specified as<br />

demoout.typ.<br />

code Parameter Specifies the target language for the translation. The following values<br />

are valid:<br />

■ ANSI_C (for ANSI C)<br />

■ C (equivalent to ANSI_C)<br />

■ KR_C (for Kernighan & Ritchie C)<br />

■ CPP (for <strong>C++</strong>)<br />

There is currently no default value, so this parameter is required.<br />

Structure declarations are identical for the C language options: C, ANSI_C, and KR_<br />

C. The style in which the initialization function is defined in the INITFILE file<br />

depends on whether KR_C is used. If the INITFILE parameter is not used, then the<br />

C language options are equivalent.<br />

Note: In the previous example for C, the target language is<br />

specified as C (code=c). In the previous example for <strong>C++</strong>, the<br />

language is <strong>C++</strong> (code=cpp) and both CPPFILE and MAPFILE<br />

parameters are specified.<br />

If you are generating <strong>C++</strong> classes by setting the CODE parameter to cpp, then you<br />

must use the CPPFILE and the MAPFILE parameters.<br />

How to Use the Object Type Translator Utility 7-13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!