![]() |
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 <collection.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, r_Transaction *ta=NULL) | |
| constructor for creating a reference with an oid More... | |
| r_Ref (const r_Ref< T > &) | |
Dereferencing the self object results in loading the object with initOId. 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 |
| dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
| T & | operator* () |
| dereference operator (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
| 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. More... | |
| T * | operator-> () |
| operator for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
| 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. More... | |
| T * | ptr () |
| method for dereferencing the reference (error kinds: r_Error_RefNull, r_Error_RefInvalid) More... | |
| 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. More... | |
| int | is_null () const |
| method for reference validity test More... | |
| int | operator== (const r_Ref< T > &refR) const |
| The method delivers true iff the oid and/or the memory pointer are valid. More... | |
| 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... | |
| 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... | |
| r_Ref (T *, r_Transaction *ta=NULL) | |
| constructor getting memory pointer More... | |
| r_Ref (const r_OId &, T *, r_Transaction *ta=NULL) | |
| 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 |
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
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 |
1.8.17