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 />

using namespace std;<br />

#ifndef CSTUDENT_ORACLE<br />

#include "cstudent.h"<br />

#endif<br />

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

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

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

class MyStudent : public CStudent {<br />

public:<br />

MyStudent(Number id_i, MyFullName *name_i, Ref& addr_i, string<br />

school_name);<br />

void displayInfo();<br />

} ;<br />

#endif<br />

Example of User-Written Extension File: mydemo.cpp<br />

#include <br />

using namespace oracle::occi;<br />

using namespace std;<br />

#include "registerMappings.h"<br />

#include "myfullname.h"<br />

#include "myaddress.h"<br />

#include "myperson.h"<br />

#include "mystudent.h"<br />

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

// method implementations for MyFullName class.<br />

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

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