Skip Headers
Oracle® C++ Call Interface Programmer's Guide,
11g Release 2 (11.2)

Part Number E10764-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
LNCPP1018

RefAny Class

The RefAny class is designed to support a reference to any type. Its primary purpose is to handle generic references and allow conversions of Ref in the type hierarchy. A RefAny object can be used as an intermediary between any two types, Ref<x> and Ref<y>, where x and y are different types.

LNCPP21439Table 13-37 Summary of RefAny Methods

Method Summary

RefAny()

Constructor for RefAny class.

clear()

Clears the reference.

getConnection()

Returns the connection this ref was created from.

isNull()

Checks if the RefAny object is NULL.

markDelete()

Marks the object as deleted.

operator=()

Assignment operator for RefAny.

operator==()

Checks if this RefAny object equals a specified RefAny.

operator!=()

Checks if not equal.

unmarkDelete()

Unmarks the object as deleted.


LNCPP21440

RefAny()

A Ref<T> can always be converted to a RefAny; there is a method to perform the conversion in the Ref<T> template. Each Ref<T> has a constructor and assignment operator that takes a reference to RefAny.

Syntax Description
RefAny();
Creates a NULL RefAny.
RefAny(
   const Connection *sessptr,
   const OCIRef *ref);
Creates a RefAny from a session pointer and a reference.
RefAny(
   const RefAny& src);
Creates a RefAny as a copy of another RefAny object.

Parameter Description
sessptr
Session pointer
ref
A reference
src
The source RefAny object to be assigned

LNCPP21441

clear()

This method clears the reference.

LNCPP21442Syntax

void clear();
LNCPP21443

getConnection()

Returns the connection from which this reference was instantiated.

LNCPP21444Syntax

const Connection* getConnection() const;
LNCPP21445

isNull()

Returns TRUE if the object pointed to by this ref is NULL else FALSE.

LNCPP21446Syntax

bool isNull() const;
LNCPP21447

markDelete()

This method marks the referred object as deleted.

LNCPP21448Syntax

void markDelete();
LNCPP21449

operator=()

Assignment operator for RefAny.

LNCPP21450Syntax

RefAny& operator=(
   const RefAny& src);
Parameter Description
src
The source RefAny object to be assigned.

LNCPP21451

operator==()

Compares this ref with a RefAny object and returns TRUE if both the refs are referring to the same object in the cache, otherwise it returns FALSE.

LNCPP21452Syntax

bool operator== (
   const RefAny &refAnyR) const;
Parameter Description
refAnyR
RefAny object to which the comparison is made.

LNCPP21453

operator!=()

Compares this ref with the RefAny object and returns TRUE if both the refs are not referring to the same object in the cache, otherwise it returns FALSE.

LNCPP21454Syntax

bool operator!= (
   const RefAny &refAnyR) const;
Parameter Description
refAnyR
RefAny object to which the comparison is made.

LNCPP21455

unmarkDelete()

This method unmarks the referred object as dirty.

LNCPP21456Syntax

void unmarkDelete();
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF