BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits > Class Template Reference

#include <BALL/CONCEPT/randomAccessIterator.h>

Inheritance diagram for BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >:
BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits > BALL::ConstForwardIterator< Container, DataType, Position, Traits > BALL::BaseIterator< Container, DataType, Position, Traits >

List of all members.


Public Types

Typedefs
typedef
std::random_access_iterator_tag 
iterator_category
typedef
ConstBidirectionalIterator
< Container, DataType,
Position, Traits > 
Base

Public Member Functions

Constructors and Destructors
BALL_INLINE ConstRandomAccessIterator ()
BALL_INLINE ConstRandomAccessIterator (const ConstRandomAccessIterator &iterator)
BALL_INLINE ~ConstRandomAccessIterator ()
Predicates
BALL_INLINE bool operator+ () const
 

Validity predicate.


BALL_INLINE bool operator- () const
 

Invalidity perdicate.


bool operator< (const ConstRandomAccessIterator &iterator) const throw (Exception::InvalidIterator, Exception::IncompatibleIterators)
bool operator<= (const ConstRandomAccessIterator &iterator) const throw (Exception::InvalidIterator, Exception::IncompatibleIterators)
bool operator>= (const ConstRandomAccessIterator &iterator) const throw (Exception::InvalidIterator, Exception::IncompatibleIterators)
bool operator> (const ConstRandomAccessIterator &iterator) const throw (Exception::InvalidIterator, Exception::IncompatibleIterators)
Iterator dereferencing
const DataType & operator[] (Index index) const throw (Exception::InvalidIterator)

Protected Member Functions

 ConstRandomAccessIterator (const Container &container)

Assignment

ConstRandomAccessIteratoroperator+= (Distance distance) throw (Exception::InvalidIterator)
ConstRandomAccessIteratoroperator-= (Distance distance) throw (Exception::InvalidIterator)
ConstRandomAccessIterator operator+ (Distance distance) const throw (Exception::InvalidIterator)
ConstRandomAccessIterator operator- (Distance distance) const throw (Exception::InvalidIterator)
Distance operator- (const ConstRandomAccessIterator &iterator) const throw (Exception::InvalidIterator, Exception::IncompatibleIterators)
static ConstRandomAccessIterator begin (const Container &container) throw (Exception::InvalidIterator)
static ConstRandomAccessIterator end (const Container &container) throw (Exception::InvalidIterator)
static ConstRandomAccessIterator rbegin (const Container &container) throw (Exception::InvalidIterator)
static ConstRandomAccessIterator rend (const Container &container) throw (Exception::InvalidIterator)

template<typename Container, typename DataType, typename Position, typename Traits>
class BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >


Member Typedef Documentation

template<typename Container, typename DataType, typename Position, typename Traits>
typedef ConstBidirectionalIterator<Container, DataType, Position, Traits> BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::Base
template<typename Container, typename DataType, typename Position, typename Traits>
typedef std::random_access_iterator_tag BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::iterator_category

Constructor & Destructor Documentation

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::ConstRandomAccessIterator (  )  [inline]
template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::ConstRandomAccessIterator ( const ConstRandomAccessIterator< Container, DataType, Position, Traits > &  iterator  )  [inline]
template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::~ConstRandomAccessIterator (  )  [inline]
template<typename Container, typename DataType, typename Position, typename Traits>
BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::ConstRandomAccessIterator ( const Container &  container  )  [inline, protected]

Member Function Documentation

template<typename Container, typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::begin ( const Container &  container  )  throw (Exception::InvalidIterator) [inline, static]
template<typename Container, typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::end ( const Container &  container  )  throw (Exception::InvalidIterator) [inline, static]
template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator+ (  )  const [inline]

Validity predicate.

Reimplemented from BALL::BaseIterator< Container, DataType, Position, Traits >.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator+ ( Distance  distance  )  const throw (Exception::InvalidIterator) [inline]

Return an iterator. It points to the element with the given distance from the element of this iterator.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > & BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator+= ( Distance  distance  )  throw (Exception::InvalidIterator) [inline]

Advance iterator a given distance.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator- (  )  const [inline]

Invalidity perdicate.

Reimplemented from BALL::BaseIterator< Container, DataType, Position, Traits >.

template<typename Container, typename DataType, typename Position, typename Traits>
Distance BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator- ( const ConstRandomAccessIterator< Container, DataType, Position, Traits > &  iterator  )  const throw (Exception::InvalidIterator, Exception::IncompatibleIterators)

Return an iterator. It points to the element with the given distance in reverse direction from the element of this iterator.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator- ( Distance  distance  )  const throw (Exception::InvalidIterator) [inline]

Return an iterator. It points to the element with the given distance in reverse direction from the element of this iterator.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > & BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator-= ( Distance  distance  )  throw (Exception::InvalidIterator) [inline]

Advance iterator a given distance in reverse direction.

template<typename Container , typename DataType , typename Position , typename Traits >
bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator< ( const ConstRandomAccessIterator< Container, DataType, Position, Traits > &  iterator  )  const throw (Exception::InvalidIterator, Exception::IncompatibleIterators) [inline]

Lesser operator. Returns true if both iterators have the same container and the element of this iterator resides before the elemen of the given iterator.

Exceptions:
InvalidIterator if one of the iterators is not valid
IncompatibleIterators if the iterators show to different containers.
template<typename Container , typename DataType , typename Position , typename Traits >
bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator<= ( const ConstRandomAccessIterator< Container, DataType, Position, Traits > &  iterator  )  const throw (Exception::InvalidIterator, Exception::IncompatibleIterators) [inline]

Lesser or equal operator. Returns true if both iterators have the same container and the element of this iterator resides before the elemen of the given iterator or both iterators point to the same element.

Exceptions:
InvalidIterator if one of the iterators is not valid
IncompatibleIterators if the iterators show to different containers.
template<typename Container , typename DataType , typename Position , typename Traits >
bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator> ( const ConstRandomAccessIterator< Container, DataType, Position, Traits > &  iterator  )  const throw (Exception::InvalidIterator, Exception::IncompatibleIterators) [inline]

Greater operator. Returns true if both iterators have the same container and the element of this iterator resides after the elemen of the given iterator.

Exceptions:
InvalidIterator if one of the iterators is not valid
IncompatibleIterators if the iterators show to different containers.
template<typename Container , typename DataType , typename Position , typename Traits >
bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator>= ( const ConstRandomAccessIterator< Container, DataType, Position, Traits > &  iterator  )  const throw (Exception::InvalidIterator, Exception::IncompatibleIterators) [inline]

Greater or equal operator. Returns true if both iterators have the same container and the element of this iterator resides after the elemen of the given iterator or both iterators point to the same element.

Exceptions:
InvalidIterator if one of the iterators is not valid
IncompatibleIterators if the iterators show to different containers.
template<typename Container , typename DataType , typename Position , typename Traits >
const DataType & BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator[] ( Index  index  )  const throw (Exception::InvalidIterator) [inline]
template<typename Container, typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::rbegin ( const Container &  container  )  throw (Exception::InvalidIterator) [inline, static]
template<typename Container, typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::rend ( const Container &  container  )  throw (Exception::InvalidIterator) [inline, static]