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.

How to Use the OTT Utility<br />

■ Contents of the demoout.typ File<br />

Contents of the demo.h File<br />

#ifndef DEMO_ORACLE<br />

# define DEMO_ORACLE<br />

#ifndef OCCI_ORACLE<br />

# include <br />

#endif<br />

/************************************************************/<br />

// generated declarations for the EMPLOYEE object type.<br />

/************************************************************/<br />

class employee : public oracle::occi::PObject {<br />

protected:<br />

OCCI_STD_NAMESPACE::string name;<br />

oracle::occi::Number empno;<br />

oracle::occi::Number deptno;<br />

oracle::occi::Date hiredate;<br />

oracle::occi::Number salary;<br />

public:<br />

void *operator new(size_t size);<br />

void *operator new(size_t size, const oracle::occi::Connection * sess,<br />

const OCCI_STD_NAMESPACE::string& table);<br />

OCCI_STD_NAMESPACE::string getSQLTypeName() const;<br />

employee();<br />

employee(void *ctxOCCI_) : oracle::occi::PObject (ctxOCCI_) { };<br />

static void *readSQL(void *ctxOCCI_);<br />

virtual void readSQL(oracle::occi::AnyData& streamOCCI_);<br />

static void writeSQL(void *objOCCI_, void *ctxOCCI_);<br />

7-6 <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!