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.

struct px1_ind col1<br />

};<br />

typedef struct px3_ind px3_ind;<br />

#endif<br />

OTT Utility Reference<br />

In the tott95b.h file, the symbol TOTT95B_ORACLE is #defined at the beginning of<br />

the file. This enables you to conditionally #include this header file in another file.<br />

To accomplish this, you would use the following construct:<br />

#ifndef TOTT95B_ORACLE<br />

#include "tott95b.h"<br />

#endif<br />

SCHEMA_NAMES Usage<br />

By using this technique, you can #include tott95b.h in, say foo.h, without<br />

having to know whether some other file #included in foo.h also #includes<br />

tott95b.h.<br />

After the definition of the symbol TOTT95B_ORACLE, the file oci.h is #included.<br />

Every HFILE generated by the OTT utility includes oci.h, which contains type<br />

and function declarations that the Pro*C/<strong>C++</strong> or OCI programmer will find useful.<br />

This is the only case in which the OTT utility uses angle brackets in a #include.<br />

Next, the file tott95a.h is included because it contains the declaration of struct<br />

px1, that tott95b.h requires. When the INTYPE file requests that type<br />

declarations be written to more than one file, the OTT utility determines which<br />

other files each HFILE must #include, and generates each necessary #include.<br />

Note that the OTT utility uses quotes in this #include. When a program including<br />

tott95b.h is compiled, the search for tott95a.h begins where the source<br />

program was found, and will thereafter follow an implementation-defined search<br />

rule. If tott95a.h cannot be found in this way, then a complete filename (for<br />

example, a UNIX absolute path name beginning with a slash character (/)) should<br />

be used in the INTYPE file to specify the location of tott95a.h.<br />

This parameter affects whether the name of a type from the default schema, to<br />

which the OTT utility is connected, is qualified with a schema name in the OUTTYPE<br />

file.<br />

The name of a type from a schema other that the default schema is always qualified<br />

with a schema name in the OUTTYPE file.<br />

How to Use the Object Type Translator Utility 7-131

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

Saved successfully!

Ooh no, something went wrong!