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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

OTT Utility Reference<br />

[TRANSLATE{member_name [AS identifier]}...]<br />

The type_name syntax follows this form:<br />

[schema_name.]type_name<br />

In this syntax, schema_name is the name of the schema that owns the given object<br />

datatype, and type_name is the name of the type. The default schema, if one is not<br />

specified, is that of the userID invoking the OTT utility. To use a specific schema,<br />

you must use schema_name.<br />

The components of the type specification are:<br />

■ type_name: Name of the object datatype.<br />

■ type_identifier: C / <strong>C++</strong> identifier used to represent the class. The<br />

GENERATE clause is used to specify the name of the class that the OTT utility<br />

generates. The AS clause specifies the name of the class that you write. The<br />

GENERATE clause is typically used to extend a class. The AS clause, when<br />

optionally used without the GENERATE clause, specifies the name of the C<br />

structure or the <strong>C++</strong> class that represents the user-defined type.<br />

■ version_string: Version string of the type that was used when the code was<br />

generated by the previous invocation of the OTT utility. The version string is<br />

generated by the OTT utility and written to the OUTTYPE file, which can later be<br />

used as the INTYPE file in later invocations of the OTT utility. The version<br />

string does not affect how the OTT utility operates, but can be used to select<br />

which version of the object datatype is used in the running program.<br />

■ hfile_name: Name of the header file into which the declarations of the<br />

corresponding class are written. If you omit the HFILE clause, then the file<br />

specified by the command line HFILE parameter is used.<br />

■ cppfile_name: Name of the <strong>C++</strong> source file into which the method<br />

implementations of the corresponding class is written. If you omit the CPPFILE<br />

clause, the file specified by the command line CPPFILE parameter is used.<br />

■ member_name: Name of an attribute (data member) that is to be translated to<br />

the identifier.<br />

■ identifier: C / <strong>C++</strong> identifier used to represent the attribute in the program.<br />

You can specify identifiers in this way for any number of attributes. The default<br />

name mapping algorithm is used for the attributes not mentioned.<br />

An object datatype may need to be translated for one of two reasons:<br />

7-128 <strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> Programmer’s <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!