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.

Example OCCI Application<br />

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

// declarations for the MyAddress class.<br />

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

class MyAddress : public CAddress {<br />

public:<br />

MyAddress(string state_i, string zip_i);<br />

void displayInfo();<br />

};<br />

#endif<br />

Example of User-Written Extension File: myperson.h<br />

#ifndef MYPERSON_ORACLE<br />

# define MYPERSON_ORACLE<br />

using namespace oracle::occi;<br />

using namespace std;<br />

#ifndef CPERSON_ORACLE<br />

#include "cperson.h"<br />

#endif<br />

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

// declarations for the MyPerson class.<br />

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

class MyPerson : public CPerson {<br />

public:<br />

MyPerson();<br />

MyPerson(void *ctxOCCI_) : CPerson(ctxOCCI_) { };<br />

MyPerson(Number id_i, MyFullName *name_i,const Ref& addr_i);<br />

void move(const Ref& new_addr);<br />

void displayInfo();<br />

};<br />

#endif<br />

Example of User-Written Extension File: mystudent.h<br />

#ifndef MYSTUDENT_ORACLE<br />

# define MYSTUDENT_ORACLE<br />

using namespace oracle::occi;<br />

How to Use the Object Type Translator Utility 7-105

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

Saved successfully!

Ooh no, something went wrong!