BALL::BaseFilterIterator< Predicate, IteratorBase > Class Template Reference

#include <BALL/MATHS/LINALG/baseFilterIterator.h>

List of all members.

Public Types

typedef
IteratorBase::container_type 
Container
typedef IteratorBase::value_type DataType
typedef
IteratorBase::difference_type 
Position
typedef IteratorBase::traits_type Traits
typedef IteratorBase::value_type value_type
typedef
IteratorBase::difference_type 
difference_type
typedef IteratorBase::pointer pointer
typedef IteratorBase::reference reference
typedef std::input_iterator_tag iterator_category

Public Member Functions

Constructors and Destructors

 BaseFilterIterator () throw ()
 Default constructor.
 BaseFilterIterator (Predicate p, IteratorBase it) throw ()
 Default constructor.
 BaseFilterIterator (const BaseFilterIterator &iterator) throw ()
 Copy constructor.
 ~BaseFilterIterator () throw ()
 Destructor.
Assignment

BaseFilterIteratoroperator= (const BaseFilterIterator &iterator) throw ()
void swap (BaseFilterIterator &iterator) throw ()
 Swap two iterators.
Accessors

void invalidate () throw ()
 Invalidate the iterator.
void setTraits (const Traits &traits) throw ()
 Set the traits.
const TraitsgetTraits () const throw ()
 Get a constant reference to the traits of this iterator.
TraitsgetTraits () throw ()
 Get a constant reference to the traits of this iterator.
void setPredicate (const Predicate &predicate) throw ()
 Set the predicates.
const Predicate & getPredicate () const throw ()
 Get a constant reference to the traits of this iterator.
Predicate & getPredicate () throw ()
 Get a constant reference to the traits of this iterator.
const ContainergetContainer () const throw ()
 Get a constant pointer to the container of this iterator.
Converters

 operator const Position & () const throw ()
reference operator* () const throw ()
 Convert an iterator to its Datatype by returning a reference to the current data.
pointer operator-> () const throw ()
 Return a pointer to the current data.
Predicates

bool operator== (const BaseFilterIterator &iterator) const throw ()
 Equality operator.
bool operator!= (const BaseFilterIterator &iterator) const throw ()
 Inequality operator.
bool operator== (const IteratorBase &iterator) const throw ()
 Equality operator.
bool operator!= (const IteratorBase &iterator) const throw ()
 Inequality operator.
bool isSingular () const throw ()
bool isValid () const throw ()
bool operator+ () const throw ()
 Validity predicate.
bool operator- () const throw ()
 Invalidity predicate.

Public Attributes

Predicate predicate_
 The instance of the iterator and the predicate.
IteratorBase iterator_

Protected Member Functions

 BaseFilterIterator (const Container &container) throw ()

Detailed Description

template<class Predicate, class IteratorBase>
class BALL::BaseFilterIterator< Predicate, IteratorBase >

Generic Iterator Class. This template class implements the basic behaviour of an iterator. Iterators are basically STL-like iterators. They provide the full STL iterator interface, but also offer additional features.

BaseIterator itself is a base class to the other iterator classes only and should not be used by itself.

Definition at line 17 of file baseFilterIterator.h.


Member Typedef Documentation

template<class Predicate, class IteratorBase>
typedef IteratorBase::container_type BALL::BaseFilterIterator< Predicate, IteratorBase >::Container
template<class Predicate, class IteratorBase>
typedef IteratorBase::value_type BALL::BaseFilterIterator< Predicate, IteratorBase >::DataType
template<class Predicate, class IteratorBase>
typedef IteratorBase::difference_type BALL::BaseFilterIterator< Predicate, IteratorBase >::difference_type
template<class Predicate, class IteratorBase>
typedef std::input_iterator_tag BALL::BaseFilterIterator< Predicate, IteratorBase >::iterator_category
template<class Predicate, class IteratorBase>
typedef IteratorBase::pointer BALL::BaseFilterIterator< Predicate, IteratorBase >::pointer
template<class Predicate, class IteratorBase>
typedef IteratorBase::difference_type BALL::BaseFilterIterator< Predicate, IteratorBase >::Position
template<class Predicate, class IteratorBase>
typedef IteratorBase::reference BALL::BaseFilterIterator< Predicate, IteratorBase >::reference
template<class Predicate, class IteratorBase>
typedef IteratorBase::traits_type BALL::BaseFilterIterator< Predicate, IteratorBase >::Traits
template<class Predicate, class IteratorBase>
typedef IteratorBase::value_type BALL::BaseFilterIterator< Predicate, IteratorBase >::value_type

Constructor & Destructor Documentation

template<class Predicate, class IteratorBase>
BALL::BaseFilterIterator< Predicate, IteratorBase >::BaseFilterIterator (  )  throw () [inline]

Default constructor.

Definition at line 56 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
BALL::BaseFilterIterator< Predicate, IteratorBase >::BaseFilterIterator ( Predicate  p,
IteratorBase  it 
) throw () [inline]

Default constructor.

Definition at line 58 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
BALL::BaseFilterIterator< Predicate, IteratorBase >::BaseFilterIterator ( const BaseFilterIterator< Predicate, IteratorBase > &  iterator  )  throw () [inline]

Copy constructor.

Definition at line 64 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
BALL::BaseFilterIterator< Predicate, IteratorBase >::~BaseFilterIterator (  )  throw () [inline]

Destructor.

Definition at line 70 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
BALL::BaseFilterIterator< Predicate, IteratorBase >::BaseFilterIterator ( const Container container  )  throw () [inline, protected]

Constructor. Protected to allow instantiation and use in derived classes only.

Definition at line 181 of file baseFilterIterator.h.


Member Function Documentation

template<class Predicate, class IteratorBase>
const Container* BALL::BaseFilterIterator< Predicate, IteratorBase >::getContainer (  )  const throw () [inline]

Get a constant pointer to the container of this iterator.

Definition at line 122 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
Predicate& BALL::BaseFilterIterator< Predicate, IteratorBase >::getPredicate (  )  throw () [inline]

Get a constant reference to the traits of this iterator.

Definition at line 119 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
const Predicate& BALL::BaseFilterIterator< Predicate, IteratorBase >::getPredicate (  )  const throw () [inline]

Get a constant reference to the traits of this iterator.

Definition at line 116 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
Traits& BALL::BaseFilterIterator< Predicate, IteratorBase >::getTraits (  )  throw () [inline]

Get a constant reference to the traits of this iterator.

Definition at line 110 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
const Traits& BALL::BaseFilterIterator< Predicate, IteratorBase >::getTraits (  )  const throw () [inline]

Get a constant reference to the traits of this iterator.

Definition at line 107 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
void BALL::BaseFilterIterator< Predicate, IteratorBase >::invalidate (  )  throw () [inline]

Invalidate the iterator.

Definition at line 101 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::isSingular (  )  const throw () [inline]

Singularity predicate. This method returns true if the iterator is singular, i.e., not associated with a container.

Definition at line 162 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::isValid (  )  const throw () [inline]

Validity predicate

Returns:
true if the iterator is valid (pointing at an element in a container)

Definition at line 167 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
BALL::BaseFilterIterator< Predicate, IteratorBase >::operator const Position & (  )  const throw () [inline]

Convert an iterator to Position. This method returns the position of the iterator. Position is a template within this context.

Definition at line 133 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::operator!= ( const IteratorBase &  iterator  )  const throw () [inline]

Inequality operator.

Definition at line 156 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::operator!= ( const BaseFilterIterator< Predicate, IteratorBase > &  iterator  )  const throw () [inline]

Inequality operator.

Definition at line 150 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
reference BALL::BaseFilterIterator< Predicate, IteratorBase >::operator* (  )  const throw () [inline]
template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::operator+ (  )  const throw () [inline]

Validity predicate.

Reimplemented in BALL::ConstRandomAccessFilterIterator< Predicate, IteratorRandomAccess >.

Definition at line 170 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::operator- (  )  const throw () [inline]

Invalidity predicate.

Reimplemented in BALL::ConstRandomAccessFilterIterator< Predicate, IteratorRandomAccess >.

Definition at line 173 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
pointer BALL::BaseFilterIterator< Predicate, IteratorBase >::operator-> (  )  const throw () [inline]
template<class Predicate, class IteratorBase>
BaseFilterIterator& BALL::BaseFilterIterator< Predicate, IteratorBase >::operator= ( const BaseFilterIterator< Predicate, IteratorBase > &  iterator  )  throw () [inline]

Assignment operator. Assigns the contents of an iterator to another iterator.

Parameters:
iterator the iterator to be copied

Definition at line 81 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::operator== ( const IteratorBase &  iterator  )  const throw () [inline]

Equality operator.

Definition at line 153 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
bool BALL::BaseFilterIterator< Predicate, IteratorBase >::operator== ( const BaseFilterIterator< Predicate, IteratorBase > &  iterator  )  const throw () [inline]

Equality operator.

Definition at line 147 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
void BALL::BaseFilterIterator< Predicate, IteratorBase >::setPredicate ( const Predicate &  predicate  )  throw () [inline]

Set the predicates.

Definition at line 113 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
void BALL::BaseFilterIterator< Predicate, IteratorBase >::setTraits ( const Traits traits  )  throw () [inline]

Set the traits.

Definition at line 104 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
void BALL::BaseFilterIterator< Predicate, IteratorBase >::swap ( BaseFilterIterator< Predicate, IteratorBase > &  iterator  )  throw () [inline]

Swap two iterators.

Definition at line 89 of file baseFilterIterator.h.


Member Data Documentation

template<class Predicate, class IteratorBase>
IteratorBase BALL::BaseFilterIterator< Predicate, IteratorBase >::iterator_

Definition at line 24 of file baseFilterIterator.h.

template<class Predicate, class IteratorBase>
Predicate BALL::BaseFilterIterator< Predicate, IteratorBase >::predicate_

The instance of the iterator and the predicate.

Definition at line 23 of file baseFilterIterator.h.

Generated by  doxygen 1.6.3