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.

PObject Class<br />

operator new()<br />

pin()<br />

This method is used to create a new object. A persistent object is created if the<br />

connection and table name are provided. Otherwise, a transient object is created.<br />

Syntax<br />

There are variants of syntax:<br />

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

void *operator new(size_t size,<br />

const Connection *x,<br />

const string& tablename,<br />

const char *type_name);<br />

Parameters<br />

size<br />

x<br />

The connection to the database in which the persistent object is to be created.<br />

tablename<br />

The name of the table in the database server.<br />

type_name<br />

The SQL type name corresponding to this <strong>C++</strong> class. The format is<br />

..<br />

This method pins the object and increments the pin count by one. As long as the<br />

object is pinned, it will not be freed by the cache even if there are no references to<br />

this object instance.<br />

Syntax<br />

void pin();<br />

8-130 <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!