Loading...
Searching...
No Matches
BALL::ConstForwardIterator< Container, DataType, Position, Traits > Class Template Reference

`#include <BALL/CONCEPT/forwardIterator.h>`

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

## Public Types

Typedefs
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 | ConstForwardIterator ()
| Default constructor.
BALL_INLINE | ConstForwardIterator (const ConstForwardIterator &iterator)
| Copy constructor.
BALL_INLINE | ~ConstForwardIterator ()
Assignment
BALL_INLINE ConstForwardIterator & | operator= (const ConstForwardIterator &iterator)
BALL_INLINE void | swap (ConstForwardIterator &iterator)
Public Member Functions inherited from BALL::BaseIterator< Container, DataType, Position, Traits >
BALL_INLINE | BaseIterator ()
| Default constructor.
BALL_INLINE | BaseIterator (const BaseIterator &iterator)
| Copy constructor.
BALL_INLINE | ~BaseIterator ()
| Destructor.
BALL_INLINE BaseIterator & | operator= (const BaseIterator &iterator)
BALL_INLINE void | swap (BaseIterator &iterator)
| Swap two iterators.
BALL_INLINE void | invalidate ()
| Invalidate the iterator.
BALL_INLINE void | setTraits (const Traits &traits)
| Set the traits.
BALL_INLINE const Traits & | getTraits () const
| Get a constant reference to the traits of this iterator.
BALL_INLINE Traits & | getTraits ()
| Get a constant reference to the traits of this iterator.
BALL_INLINE const Container * | getContainer () const
| Get a constant pointer to the container of this iterator.
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.
BALL_INLINE pointer | operator-> () const
| Return a pointer to the current data.
BALL_INLINE bool | operator== (const BaseIterator &iterator) const
| Equality operator.
BALL_INLINE bool | operator!= (const BaseIterator &iterator) const
| Inequality operator.
BALL_INLINE bool | isSingular () const
BALL_INLINE bool | isValid () const
BALL_INLINE bool | operator+ () const
| Validity predicate.
BALL_INLINE bool | operator- () const
| Invalidity perdicate.

## Iterator methods

BALL_INLINE void | toBegin ()
BALL_INLINE bool | isBegin () const
| Check whether the iterator points to the first item of the container.
BALL_INLINE void | toEnd ()
BALL_INLINE bool | isEnd () const
| Check whether the iterator points behind the last item of the container.
BALL_INLINE ConstForwardIterator & | operator++ ()
BALL_INLINE ConstForwardIterator | operator++ (int)
static ConstForwardIterator | begin (const Container &container)
static ConstForwardIterator | end (const Container &container)
BALL_INLINE | ConstForwardIterator (const Container &container)

## Additional Inherited Members

BALL_INLINE | BaseIterator (const Container &container)

## Detailed Description

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

Generic non-mutable forward itterator

Definition at line 24 of file forwardIterator.h.

## Member Typedef Documentation

## Base

template<typename Container, typename DataType, typename Position, typename Traits>

typedef BaseIterator<Container, DataType, Position, Traits> BALL::ConstForwardIterator< Container, DataType, Position, Traits >::Base

Definition at line 36 of file forwardIterator.h.

## iterator_category

template<typename Container, typename DataType, typename Position, typename Traits>

typedef std::forward_iterator_tag BALL::ConstForwardIterator< Container, DataType, Position, Traits >::iterator_category

Definition at line 34 of file forwardIterator.h.

## Constructor & Destructor Documentation

## ConstForwardIterator() [1/3]

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE BALL::ConstForwardIterator< Container, DataType, Position, Traits >::ConstForwardIterator | ( |  | ) |

inline

Default constructor.

Definition at line 44 of file forwardIterator.h.

## ConstForwardIterator() [2/3]

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE BALL::ConstForwardIterator< Container, DataType, Position, Traits >::ConstForwardIterator | ( | const ConstForwardIterator< Container, DataType, Position, Traits > & | iterator | ) |

inline

Copy constructor.

Definition at line 47 of file forwardIterator.h.

## ~ConstForwardIterator()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE BALL::ConstForwardIterator< Container, DataType, Position, Traits >::~ConstForwardIterator | ( |  | ) |

inline

Definition at line 53 of file forwardIterator.h.

## ConstForwardIterator() [3/3]

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE BALL::ConstForwardIterator< Container, DataType, Position, Traits >::ConstForwardIterator | ( | const Container & | container | ) |

inline protected

Definition at line 127 of file forwardIterator.h.

## Member Function Documentation

## begin()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE ConstForwardIterator< Container, DataType, Position, Traits > BALL::ConstForwardIterator< Container, DataType, Position, Traits >::begin | ( | const Container & | container | ) |

static

Return an iterator pointing to the beginning of the container

Exceptions

  Exception::Precondition |

Definition at line 145 of file forwardIterator.h.

## end()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE ConstForwardIterator< Container, DataType, Position, Traits > BALL::ConstForwardIterator< Container, DataType, Position, Traits >::end | ( | const Container & | container | ) |

static

Return an iterator pointing at the end of the container

Exceptions

  Exception::Precondition |

Definition at line 175 of file forwardIterator.h.

## isBegin()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE bool BALL::ConstForwardIterator< Container, DataType, Position, Traits >::isBegin | ( |  | ) | const

Check whether the iterator points to the first item of the container.

Definition at line 154 of file forwardIterator.h.

## isEnd()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE bool BALL::ConstForwardIterator< Container, DataType, Position, Traits >::isEnd | ( |  | ) | const

Check whether the iterator points behind the last item of the container.

Definition at line 184 of file forwardIterator.h.

## operator++() [1/2]

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE ConstForwardIterator & BALL::ConstForwardIterator< Container, DataType, Position, Traits >::operator++ | ( |  | ) |

inline

Increment operator

Exceptions

  Exception::Precondition |

Definition at line 104 of file forwardIterator.h.

## operator++() [2/2]

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE ConstForwardIterator BALL::ConstForwardIterator< Container, DataType, Position, Traits >::operator++ | ( | int |  | ) |

inline

Postfix increment operator

Exceptions

  Exception::Precondition |

Definition at line 114 of file forwardIterator.h.

## operator=()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE ConstForwardIterator & BALL::ConstForwardIterator< Container, DataType, Position, Traits >::operator= | ( | const ConstForwardIterator< Container, DataType, Position, Traits > & | iterator | ) |

inline

Definition at line 61 of file forwardIterator.h.

## swap()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE void BALL::ConstForwardIterator< Container, DataType, Position, Traits >::swap | ( | ConstForwardIterator< Container, DataType, Position, Traits > & | iterator | ) |

inline

Definition at line 68 of file forwardIterator.h.

## toBegin()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE void BALL::ConstForwardIterator< Container, DataType, Position, Traits >::toBegin | ( |  | ) |

Move the iterator to the item at the beginning of the container

Exceptions

  Exception::Precondition |

Definition at line 136 of file forwardIterator.h.

## toEnd()

template<typename Container, typename DataType, typename Position, typename Traits>

BALL_INLINE void BALL::ConstForwardIterator< Container, DataType, Position, Traits >::toEnd | ( |  | ) |

Move the iterator behind the last item of the container

Exceptions

  Exception::Precondition |

Definition at line 166 of file forwardIterator.h.