rasdaman complete source
Public Member Functions | List of all members
r_Iterator< T > Class Template Reference

#include <collection.hh>

Public Member Functions

 r_Iterator ()
 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 ()
 destructor 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...
 
int not_done () const
 returns 1 if there are more elements to be visited in the iteration and 0 if iteration is complete More...
 
void advance ()
 advances one element More...
 
operator* () throw ( r_Error )
 the dereference operator gets the actual element More...
 
get_element () const throw ( r_Error )
 gets the actual element More...
 
int 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...
 

Constructor & Destructor Documentation

template<class T>
r_Iterator< T >::r_Iterator ( )

default constructor

template<class T>
r_Iterator< T >::r_Iterator ( const r_Iterator< T > &  iter)

copy constructor

template<class T>
r_Iterator< T >::r_Iterator ( r_Collection< T > &  source,
int  removed_objects = 0 
)

constructor getting the collection on which to iterate (used for { r_Collection::create_iterator()})

template<class T>
r_Iterator< T >::~r_Iterator ( )

destructor

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).

Member Function Documentation

template<class T>
void r_Iterator< T >::advance ( )

advances one element

template<class T>
T r_Iterator< T >::get_element ( ) const
throw (r_Error
)

gets the actual element

template<class T>
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

template<class T>
int r_Iterator< T >::next ( T &  element)

gets the actual element, advances one element, and returns whether iteration is complete or not

template<class T>
int r_Iterator< T >::not_done ( ) const
inline

returns 1 if there are more elements to be visited in the iteration and 0 if iteration is complete

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).

template<class T>
T r_Iterator< T >::operator* ( )
throw (r_Error
)

the dereference operator gets the actual element

template<class T>
r_Iterator<T>& r_Iterator< T >::operator++ ( )

prefix incrementor

template<class T>
r_Iterator<T> r_Iterator< T >::operator++ ( int  )

postfix incrementor

template<class T>
r_Iterator<T>& r_Iterator< T >::operator= ( const r_Iterator< T > &  iter)

assignment operator

template<class T>
void r_Iterator< T >::replace_element ( const T &  element)

replaces the actual element (can only be used with r_List)

template<class T>
void r_Iterator< T >::reset ( int  removed_objects = 0)

re-initialize the iterator to the start of iteration for the same collection


The documentation for this class was generated from the following files: