BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Protected Member Functions | List of all members
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 > BALL::RandomAccessIterator< Container, DataType, Position, Traits >

Public Types

Typedefs
typedef
std::random_access_iterator_tag 
iterator_category
 
typedef
ConstBidirectionalIterator
< Container, DataType,
Position, Traits > 
Base
 
- Public Types inherited from BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >
typedef
std::bidirectional_iterator_tag 
iterator_category
 
typedef ConstForwardIterator
< Container, DataType,
Position, Traits > 
Base
 
- Public Types inherited from BALL::ConstForwardIterator< Container, DataType, Position, Traits >
typedef std::forward_iterator_tag iterator_category
 
typedef BaseIterator
< Container, DataType,
Position, Traits > 
Base
 
- Public Types inherited from BALL::BaseIterator< Container, DataType, Position, Traits >
typedef DataType value_type
 
typedef Position difference_type
 
typedef const DataType * pointer
 
typedef const DataType & reference
 
typedef std::input_iterator_tag iterator_category
 

Public Member Functions

Constructors and Destructors
BALL_INLINE ConstRandomAccessIterator ()
 
BALL_INLINE ConstRandomAccessIterator (const ConstRandomAccessIterator &iterator)
 
BALL_INLINE ~ConstRandomAccessIterator ()
 
Predicates
BALL_INLINE bool operator+ () const
 
BALL_INLINE bool operator- () const
 
bool operator< (const ConstRandomAccessIterator &iterator) const
 
bool operator<= (const ConstRandomAccessIterator &iterator) const
 
bool operator>= (const ConstRandomAccessIterator &iterator) const
 
bool operator> (const ConstRandomAccessIterator &iterator) const
 
Iterator dereferencing
const DataType & operator[] (Index index) const
 
- Public Member Functions inherited from BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >
BALL_INLINE ConstBidirectionalIterator ()
 
BALL_INLINE ConstBidirectionalIterator (const ConstBidirectionalIterator &iterator)
 
BALL_INLINE ~ConstBidirectionalIterator ()
 
BALL_INLINE void toBegin ()
 
BALL_INLINE bool isBegin () const
 Check whether the iterator points to the item at the beginning of the container. More...
 
void toEnd ()
 
BALL_INLINE bool isEnd () const
 Check whether the iterator points to the position after the last item of the container. More...
 
void toRBegin ()
 
BALL_INLINE bool isRBegin () const
 Test whether the iterator points to the "reverse" first element of the container. More...
 
void toREnd ()
 
BALL_INLINE bool isREnd () const
 Test wheter the iterator points to the position before the first element. More...
 
BALL_INLINE
ConstBidirectionalIterator
operator++ ()
 
BALL_INLINE
ConstBidirectionalIterator 
operator++ (int)
 
BALL_INLINE
ConstBidirectionalIterator
operator-- ()
 
BALL_INLINE
ConstBidirectionalIterator 
operator-- (int)
 
- Public Member Functions inherited from BALL::ConstForwardIterator< Container, DataType, Position, Traits >
BALL_INLINE ConstForwardIterator ()
 Default constructor. More...
 
BALL_INLINE ConstForwardIterator (const ConstForwardIterator &iterator)
 Copy constructor. More...
 
BALL_INLINE ~ConstForwardIterator ()
 
BALL_INLINE ConstForwardIteratoroperator= (const ConstForwardIterator &iterator)
 
BALL_INLINE void swap (ConstForwardIterator &iterator)
 
BALL_INLINE void toBegin ()
 
BALL_INLINE bool isBegin () const
 Check whether the iterator points to the first item of the container. More...
 
BALL_INLINE void toEnd ()
 
BALL_INLINE bool isEnd () const
 Check whether the iterator points behind the last item of the container. More...
 
BALL_INLINE ConstForwardIteratoroperator++ ()
 
BALL_INLINE ConstForwardIterator operator++ (int)
 
- Public Member Functions inherited from BALL::BaseIterator< Container, DataType, Position, Traits >
BALL_INLINE BaseIterator ()
 Default constructor. More...
 
BALL_INLINE BaseIterator (const BaseIterator &iterator)
 Copy constructor. More...
 
BALL_INLINE ~BaseIterator ()
 Destructor. More...
 
BALL_INLINE BaseIteratoroperator= (const BaseIterator &iterator)
 
BALL_INLINE void swap (BaseIterator &iterator)
 Swap two iterators. More...
 
BALL_INLINE void invalidate ()
 Invalidate the iterator. More...
 
BALL_INLINE void setTraits (const Traits &traits)
 Set the traits. More...
 
BALL_INLINE const Traits & getTraits () const
 Get a constant reference to the traits of this iterator. More...
 
BALL_INLINE Traits & getTraits ()
 Get a constant reference to the traits of this iterator. More...
 
BALL_INLINE const Container * getContainer () const
 Get a constant pointer to the container of this iterator. More...
 
BALL_INLINE operator const Position & () const
 
BALL_INLINE reference operator* () const
 Convert an iterator to its Datatype by returning a reference to the current data. More...
 
BALL_INLINE pointer operator-> () const
 Return a pointer to the current data. More...
 
BALL_INLINE bool operator== (const BaseIterator &iterator) const
 Equality operator. More...
 
BALL_INLINE bool operator!= (const BaseIterator &iterator) const
 Inequality operator. More...
 
BALL_INLINE bool isSingular () const
 
BALL_INLINE bool isValid () const
 
BALL_INLINE bool operator+ () const
 Validity predicate. More...
 
BALL_INLINE bool operator- () const
 Invalidity perdicate. More...
 

Protected Member Functions

 ConstRandomAccessIterator (const Container &container)
 
- Protected Member Functions inherited from BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >
BALL_INLINE ConstBidirectionalIterator (const Container &container)
 Construct an iterator bound to a specific container. More...
 
- Protected Member Functions inherited from BALL::ConstForwardIterator< Container, DataType, Position, Traits >
BALL_INLINE ConstForwardIterator (const Container &container)
 
- Protected Member Functions inherited from BALL::BaseIterator< Container, DataType, Position, Traits >
BALL_INLINE BaseIterator (const Container &container)
 

Assignment

ConstRandomAccessIteratoroperator+= (Distance distance)
 
ConstRandomAccessIteratoroperator-= (Distance distance)
 
ConstRandomAccessIterator operator+ (Distance distance) const
 
ConstRandomAccessIterator operator- (Distance distance) const
 
Distance operator- (const ConstRandomAccessIterator &iterator) const
 
static ConstRandomAccessIterator begin (const Container &container)
 
static ConstRandomAccessIterator end (const Container &container)
 
static ConstRandomAccessIterator rbegin (const Container &container)
 
static ConstRandomAccessIterator rend (const Container &container)
 

Additional Inherited Members

- Static Public Member Functions inherited from BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >
static ConstBidirectionalIterator begin (const Container &container)
 
static ConstBidirectionalIterator end (const Container &container)
 
static ConstBidirectionalIterator rbegin (const Container &container)
 
static ConstBidirectionalIterator rend (const Container &container)
 
- Static Public Member Functions inherited from BALL::ConstForwardIterator< Container, DataType, Position, Traits >
static ConstForwardIterator begin (const Container &container)
 
static ConstForwardIterator end (const Container &container)
 

Detailed Description

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

Definition at line 24 of file randomAccessIterator.h.

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

Definition at line 36 of file randomAccessIterator.h.

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

Definition at line 34 of file randomAccessIterator.h.

Constructor & Destructor Documentation

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::ConstRandomAccessIterator ( )
inline

Definition at line 44 of file randomAccessIterator.h.

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

Definition at line 47 of file randomAccessIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::~ConstRandomAccessIterator ( )
inline

Definition at line 53 of file randomAccessIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::ConstRandomAccessIterator ( const Container &  container)
inlineprotected

Definition at line 178 of file randomAccessIterator.h.

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

Return a ConstRandomAccessIterator for a given container. It points to the first element.

Exceptions
Exception::InvalidIterator

Definition at line 371 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::end ( const Container &  container)
static

Return a Const RandomAccessIterator for a given container. It points behind the last element of the container.

Exceptions
Exception::InvalidIterator

Definition at line 380 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator+ ( Distance  distance) const

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

Exceptions
Exception::InvalidIterator

Definition at line 264 of file randomAccessIterator.h.

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

Definition at line 124 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > & BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator+= ( Distance  distance)

Advance iterator a given distance.

Exceptions
Exception::InvalidIterator

Definition at line 224 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator- ( Distance  distance) const

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

Exceptions
Exception::InvalidIterator

Definition at line 272 of file randomAccessIterator.h.

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

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

Exceptions
Exception::InvalidIterator
Exception::IncompatibleIterators
template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator- ( ) const
inline

Definition at line 127 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > & BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator-= ( Distance  distance)

Advance iterator a given distance in reverse direction.

Exceptions
Exception::InvalidIterator

Definition at line 240 of file randomAccessIterator.h.

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

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
InvalidIteratorif one of the iterators is not valid
IncompatibleIteratorsif the iterators show to different containers.

Definition at line 280 of file randomAccessIterator.h.

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

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
InvalidIteratorif one of the iterators is not valid
IncompatibleIteratorsif the iterators show to different containers.

Definition at line 300 of file randomAccessIterator.h.

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

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
InvalidIteratorif one of the iterators is not valid
IncompatibleIteratorsif the iterators show to different containers.

Definition at line 339 of file randomAccessIterator.h.

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

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
InvalidIteratorif one of the iterators is not valid
IncompatibleIteratorsif the iterators show to different containers.

Definition at line 319 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
const DataType & BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::operator[] ( Index  index) const

Random access operator.

Exceptions
Exception::InvalidIterator

Definition at line 359 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::rbegin ( const Container &  container)
static

Return a Const RandomAccessIterator for a given container. It points at the last element of the container.

Exceptions
Exception::InvalidIterator

Definition at line 389 of file randomAccessIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
ConstRandomAccessIterator< Container, DataType, Position, Traits > BALL::ConstRandomAccessIterator< Container, DataType, Position, Traits >::rend ( const Container &  container)
static

Return a Const RandomAccessIterator for a given container. It points before the first element.

Exceptions
Exception::InvalidIterator

Definition at line 398 of file randomAccessIterator.h.