rasdaman API
|
#include <oqlquery.hh>
Public Member Functions | |
r_Ref () | |
default constructor More... | |
r_Ref (const r_Ref_Any &) | |
constructor for r_Ref_Any objects More... | |
r_Ref (const r_OId &initOId) | |
constructor for creating a reference with an oid More... | |
r_Ref (const r_Ref< T > &) | |
copy constructor More... | |
~r_Ref () | |
destructor deletes referenced object from main memory and database More... | |
operator r_Ref_Any () const | |
cast to {r_Ref_Any} More... | |
r_Ref< T > & | operator= (const r_Ref_Any &) |
assignment operator for assigning a {r_Ref_Any} More... | |
r_Ref< T > & | operator= (T *) |
assignment operator for assigning a C pointer More... | |
r_Ref< T > & | operator= (const r_Ref< T > &) |
assignment operator for assigning a r_Ref pointer More... | |
const T & | operator* () const throw (r_Error) |
dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
T & | operator* () throw ( r_Error ) |
dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
const T * | operator-> () const throw (r_Error) |
T * | operator-> () throw ( r_Error ) |
operator for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
const T * | ptr () const throw (r_Error) |
T * | ptr () throw ( r_Error ) |
method for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
int | operator! () const |
operator for validity test More... | |
int | is_null () const |
method for reference validity test More... | |
void | destroy () |
delete from main memory More... | |
void | delete_object () |
deletes referenced object from main memory and database More... | |
const r_OId & | get_oid () const |
get oid More... | |
int | operator== (const r_Ref< T > &refR) const |
int | operator!= (const r_Ref< T > &refR) const |
int | operator== (const T *) const |
compares the memory pointer (does not load the object) More... | |
int | operator!= (const T *) const |
compares the memory pointer (does not load the object) More... | |
r_Ref (T *) | |
constructor getting memory pointer More... | |
r_Ref (const r_OId &, T *) | |
constructor getting oid and memory pointer More... | |
T * | get_memory_ptr () const |
get memory pointer (without loading the object) More... | |
unsigned int | is_oid_valid () const |
References of type {r_Ref} in many respects behave like C++ pointers but provide an additional mechanism that guarantees integrity in references to persistent objects. {r_Ref} implements a so called { smart pointer} which behaves like a C++ pointer but can do additional things in time of dereferencing the pointer. In case that no valid memory pointer is available, which means that the object is not present, and an oid is existing, the object belonging to the oid is read from the db and the new memory pointer is given back.
constructor for creating a reference with an oid
copy constructor
Dereferencing the self object results in loading the object with { initOId}.
destructor deletes referenced object from main memory and database
constructor getting oid and memory pointer
void r_Ref< T >::delete_object | ( | ) |
deletes referenced object from main memory and database
void r_Ref< T >::destroy | ( | ) |
delete from main memory
T* r_Ref< T >::get_memory_ptr | ( | ) | const |
get memory pointer (without loading the object)
int r_Ref< T >::is_null | ( | ) | const |
method for reference validity test
|
inline |
int r_Ref< T >::operator! | ( | ) | const |
operator for validity test
If the memory pointer is zero and the oid is valid, the object is loaded from the server and the new memory location is returned.
compares the memory pointer (does not load the object)
dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid)
dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid)
If the memory pointer is zero and the oid is valid, the object is loaded from the server and a reference to the object in memory is returned.
operator for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid)
assignment operator for assigning a {r_Ref_Any}
assignment operator for assigning a C pointer
assignment operator for assigning a r_Ref pointer
The method delivers true iff the oid and/or the memory pointer are valid.
int r_Ref< T >::operator== | ( | const T * | ) | const |
compares the memory pointer (does not load the object)
If the memory pointer is zero and the oid is valid, the object is loaded from the server and the new memory location is returned.
method for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid)