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::ConstBidirectionalIterator< Container, DataType, Position, Traits > Class Template Reference

#include <BALL/CONCEPT/bidirectionalIterator.h>

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

Public Types

Typedefs
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 destructor.
BALL_INLINE ConstBidirectionalIterator ()
 
BALL_INLINE ConstBidirectionalIterator (const ConstBidirectionalIterator &iterator)
 
BALL_INLINE ~ConstBidirectionalIterator ()
 
- 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

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)
 

Iterator methods

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)
 
static ConstBidirectionalIterator begin (const Container &container)
 
static ConstBidirectionalIterator end (const Container &container)
 
static ConstBidirectionalIterator rbegin (const Container &container)
 
static ConstBidirectionalIterator rend (const Container &container)
 

Additional Inherited Members

- 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::ConstBidirectionalIterator< Container, DataType, Position, Traits >

Constant Bidirectional Iterator.

Definition at line 23 of file bidirectionalIterator.h.

Member Typedef Documentation

template<typename Container, typename DataType, typename Position, typename Traits>
typedef ConstForwardIterator<Container, DataType, Position, Traits> BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::Base

Definition at line 35 of file bidirectionalIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
typedef std::bidirectional_iterator_tag BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::iterator_category

Definition at line 33 of file bidirectionalIterator.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file bidirectionalIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::ConstBidirectionalIterator ( const ConstBidirectionalIterator< Container, DataType, Position, Traits > &  iterator)
inline

Definition at line 46 of file bidirectionalIterator.h.

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

Definition at line 52 of file bidirectionalIterator.h.

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

Construct an iterator bound to a specific container.

Definition at line 135 of file bidirectionalIterator.h.

Member Function Documentation

template<typename Container, typename DataType , typename Position , typename Traits >
BALL_INLINE ConstBidirectionalIterator< Container, DataType, Position, Traits > BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::begin ( const Container &  container)
static

Return an iterator pointing to the first item of the container

Exceptions
Exception::Precondition

Definition at line 219 of file bidirectionalIterator.h.

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

Return an iterator pointing to the position after the last element.

Exceptions
Exception::Precondition

Definition at line 229 of file bidirectionalIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::isBegin ( ) const
inline

Check whether the iterator points to the item at the beginning of the container.

Definition at line 65 of file bidirectionalIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::isEnd ( ) const
inline

Check whether the iterator points to the position after the last item of the container.

Definition at line 73 of file bidirectionalIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::isRBegin ( ) const
inline

Test whether the iterator points to the "reverse" first element of the container.

Definition at line 81 of file bidirectionalIterator.h.

template<typename Container, typename DataType, typename Position, typename Traits>
BALL_INLINE bool BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::isREnd ( ) const
inline

Test wheter the iterator points to the position before the first element.

Definition at line 89 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE ConstBidirectionalIterator< Container, DataType, Position, Traits > & BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::operator++ ( )

Increment operator

Exceptions
Exception::Precondition

Definition at line 177 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE ConstBidirectionalIterator< Container, DataType, Position, Traits > BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::operator++ ( int  )

Postfix increment operator

Exceptions
Exception::Precondition

Definition at line 187 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE ConstBidirectionalIterator< Container, DataType, Position, Traits > & BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::operator-- ( )

Decrement operator

Exceptions
Exception::Precondition

Definition at line 198 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE ConstBidirectionalIterator< Container, DataType, Position, Traits > BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::operator-- ( int  )

Postfix decrement operator

Exceptions
Exception::Precondition

Definition at line 208 of file bidirectionalIterator.h.

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

Return an iterator pointing to the last element

Exceptions
Exception::Precondition

Definition at line 239 of file bidirectionalIterator.h.

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

Return an iterator pointing to the positon before the first element

Exceptions
Exception::Precondition

Definition at line 249 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE void BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::toBegin ( )

Move the iterator to the beginning of the container

Exceptions
Exception::Precondition

Definition at line 144 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE void BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::toEnd ( )

Move the iterator to the position after the last item of the container

Exceptions
Exception::Precondition

Definition at line 152 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE void BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::toRBegin ( )

Move the iterator to the "reverse" beginning of the container

Exceptions
Exception::Precondition

Definition at line 160 of file bidirectionalIterator.h.

template<typename Container , typename DataType , typename Position , typename Traits >
BALL_INLINE void BALL::ConstBidirectionalIterator< Container, DataType, Position, Traits >::toREnd ( )

Move the iterator to the position before the first element

Exceptions
Exception::Precondition

Definition at line 168 of file bidirectionalIterator.h.