![]() |
rasdaman client API 10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
|
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. More...
#include <ref.hh>
Public Member Functions | |
| r_Ref () | |
| default constructor | |
| r_Ref (const r_Ref_Any &) | |
| constructor for r_Ref_Any objects | |
| r_Ref (const r_OId &initOId, r_Transaction *ta=NULL) | |
| constructor for creating a reference with an oid | |
| r_Ref (const r_Ref< T > &) | |
Dereferencing the self object results in loading the object with initOId. | |
| ~r_Ref () | |
| destructor deletes referenced object from main memory and database | |
| operator r_Ref_Any () const | |
| cast to r_Ref_Any | |
| r_Ref< T > & | operator= (const r_Ref_Any &) |
| assignment operator for assigning a r_Ref_Any | |
| r_Ref< T > & | operator= (T *) |
| assignment operator for assigning a C pointer | |
| r_Ref< T > & | operator= (const r_Ref< T > &) |
| assignment operator for assigning a r_Ref pointer | |
| const T & | operator* () const |
| dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid) | |
| T & | operator* () |
| dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid) | |
| const T * | operator-> () const |
| 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. | |
| T * | operator-> () |
| operator for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid) | |
| const T * | ptr () const |
| 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. | |
| T * | ptr () |
| method for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid) | |
| int | operator! () const |
| 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. | |
| int | is_null () const |
| method for reference validity test | |
| int | operator== (const r_Ref< T > &refR) const |
| The method delivers true iff the oid and/or the memory pointer are valid. | |
| int | operator!= (const r_Ref< T > &refR) const |
| int | operator== (const T *) const |
| compares the memory pointer (does not load the object) | |
| int | operator!= (const T *) const |
| compares the memory pointer (does not load the object) | |
| void | destroy () |
| delete from main memory | |
| void | delete_object () |
| deletes referenced object from main memory and database | |
| const r_OId & | get_oid () const |
| get oid | |
| r_Ref (T *, r_Transaction *ta=NULL) | |
| constructor getting memory pointer | |
| r_Ref (const r_OId &, T *, r_Transaction *ta=NULL) | |
| constructor getting oid and memory pointer | |
| T * | get_memory_ptr () const |
| get memory pointer (without loading the object) | |
| unsigned int | is_oid_valid () const |
Protected Attributes | |
| r_Transaction * | ta {NULL} |
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.
| r_Ref< T >::r_Ref | ( | const r_OId & | initOId, |
| r_Transaction * | ta = NULL |
||
| ) |
constructor for creating a reference with an oid
Dereferencing the self object results in loading the object with initOId.
copy constructor
destructor deletes referenced object from main memory and database
| r_Ref< T >::r_Ref | ( | T * | , |
| r_Transaction * | ta = NULL |
||
| ) |
constructor getting memory pointer
| r_Ref< T >::r_Ref | ( | const r_OId & | , |
| T * | , | ||
| r_Transaction * | ta = NULL |
||
| ) |
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
| unsigned int r_Ref< T >::is_oid_valid | ( | ) | const |
| int r_Ref< T >::operator! | ( | ) | const |
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.
operator for validity test
| int r_Ref< T >::operator!= | ( | const r_Ref< T > & | refR | ) | const |
| int r_Ref< T >::operator!= | ( | const T * | ) | const |
compares the memory pointer (does not load the object)
| T & r_Ref< T >::operator* | ( | ) |
dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid)
| const T & r_Ref< T >::operator* | ( | ) | const |
dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid)
| T * r_Ref< T >::operator-> | ( | ) |
operator for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid)
| const T * r_Ref< T >::operator-> | ( | ) | const |
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.
assignment operator for assigning a r_Ref pointer
assignment operator for assigning a r_Ref_Any
assignment operator for assigning a C 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)
| T * r_Ref< T >::ptr | ( | ) |
method for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid)
| const T * r_Ref< T >::ptr | ( | ) | const |
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.
|
protected |