![]() |
rasdaman client API
10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
|
The template class r_Iterator defines the generic behavior for iteration. More...
#include <collection.hh>
Public Member Functions | |
| r_Iterator ()=default | |
| default constructor More... | |
| r_Iterator (const r_Iterator< T > &iter) | |
| copy constructor More... | |
| r_Iterator (r_Collection< T > &source, int removed_objects=0) | |
constructor getting the collection on which to iterate (used for r_Collection::create_iterator()) More... | |
| ~r_Iterator ()=default | |
| Creates an iterator which points to the first element of the element collection. More... | |
| r_Iterator< T > & | operator= (const r_Iterator< T > &iter) |
| assignment operator More... | |
| int | is_equal (const r_Iterator< T > &iter) const |
| comparisons: equal if they point to the same element in the same collection, not equal if they point to different collections or elements More... | |
| r_Iterator< T > & | operator++ () |
| prefix incrementor More... | |
| r_Iterator< T > | operator++ (int) |
| postfix incrementor More... | |
| void | reset (int removed_objects=0) |
| re-initialize the iterator to the start of iteration for the same collection More... | |
| bool | not_done () const |
| Resets the iterator to point to the first element of the element collection. More... | |
| void | advance () |
| advances one element More... | |
| T | operator* () |
| the dereference operator gets the actual element More... | |
| T | get_element () const |
| gets the actual element More... | |
| bool | next (T &element) |
| gets the actual element, advances one element, and returns whether iteration is complete or not More... | |
| void | replace_element (const T &element) |
| replaces the actual element (can only be used with r_List) More... | |
The template class r_Iterator defines the generic behavior for iteration.
All iterators use a consistent protocol for sequentially returning each element from the collection over which the iteration is defined. When an iterator is constructed, it is either initialized with another iterator or is set to null. When an iterator is constructed via the create_iterator() method defined in r_Collection, the iterator is initailized to point to the first element, if there is one.
|
default |
default constructor
| r_Iterator< T >::r_Iterator | ( | const r_Iterator< T > & | iter | ) |
copy constructor
|
explicit |
constructor getting the collection on which to iterate (used for r_Collection::create_iterator())
|
default |
Creates an iterator which points to the first element of the element collection.
If removed_objects ist set to 1, the iterator points to the first element of the list containing the removed objects (for internal use). destructor
| void r_Iterator< T >::advance | ( | ) |
advances one element
| T r_Iterator< T >::get_element | ( | ) | const |
gets the actual element
| int r_Iterator< T >::is_equal | ( | const r_Iterator< T > & | iter | ) | const |
comparisons: equal if they point to the same element in the same collection, not equal if they point to different collections or elements
| bool r_Iterator< T >::next | ( | T & | element | ) |
gets the actual element, advances one element, and returns whether iteration is complete or not
| bool r_Iterator< T >::not_done | ( | ) | const |
Resets the iterator to point to the first element of the element collection.
If removed_objects ist set to 1, the iterator points to the first element of the list containing the removed objects (for internal use). returns 1 if there are more elements to be visited in the iteration and 0 if iteration is complete
| T r_Iterator< T >::operator* | ( | ) |
the dereference operator gets the actual element
| r_Iterator<T>& r_Iterator< T >::operator++ | ( | ) |
prefix incrementor
| r_Iterator<T> r_Iterator< T >::operator++ | ( | int | ) |
postfix incrementor
| r_Iterator<T>& r_Iterator< T >::operator= | ( | const r_Iterator< T > & | iter | ) |
assignment operator
| void r_Iterator< T >::replace_element | ( | const T & | element | ) |
replaces the actual element (can only be used with r_List)
| void r_Iterator< T >::reset | ( | int | removed_objects = 0 | ) |
re-initialize the iterator to the start of iteration for the same collection
1.8.17