Oracle C++ Call Interface Programmer's Guide Release 2 (9.2) Part Number A96583-01 |
|
OCCI Classes and Methods, 17 of 22
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.
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
.
RefAny(); RefAny(const Connection *sessptr, const OCIRef *Ref); RefAny(const RefAny& src);
This method clears the reference.
void clear();
Returns the connection from which this ref was instantiated.
const Connection * getConnection() const;
Returns the underlying OCIRef *
LNOCIRef* getRef() const;
Returns true if the object pointed to by this ref is null else false.
bool isNull() const;
This method marks the referred object as deleted.
void markDelete();
Assigns the ref or the object to a ref. For the first case, the refs are assigned and for the second case, the ref is constructed from the object and then assigned.
RefAny& operator=(const RefAny& src);
The source RefAny object to be assigned.
Compares this ref with the RefAny object and returns true if both the refs are referring to the same object in the cache, otherwise it returns false.
bool operator== (const RefAny &refAnyR) const;
RefAny object to be compared with.
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.
bool operator!= (const RefAny &refAnyR) const;
RefAny object to be compared with.
This method unmarks the referred object as dirty.
void unmarkDelete();
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|