PPL  1.2
Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator Class Reference

A read-only iterator over the rows of the matrix. More...

#include <DB_Matrix_defs.hh>

Collaboration diagram for Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator:

Public Types

typedef std::forward_iterator_tag iterator_category
 
typedef std::iterator_traits< Iter >::value_type value_type
 
typedef std::iterator_traits< Iter >::difference_type difference_type
 
typedef std::iterator_traits< Iter >::pointer pointer
 
typedef std::iterator_traits< Iter >::reference reference
 

Public Member Functions

 const_iterator ()
 Default constructor. More...
 
 const_iterator (const Iter &b)
 Builds a const iterator on the matrix starting from an iterator b on the elements of the vector rows. More...
 
 const_iterator (const const_iterator &y)
 Ordinary copy constructor. More...
 
const_iteratoroperator= (const const_iterator &y)
 Assignment operator. More...
 
reference operator* () const
 Dereference operator. More...
 
pointer operator-> () const
 Indirect member selector. More...
 
const_iteratoroperator++ ()
 Prefix increment operator. More...
 
const_iterator operator++ (int)
 Postfix increment operator. More...
 
bool operator== (const const_iterator &y) const
 Returns true if and only if *this and y are identical. More...
 
bool operator!= (const const_iterator &y) const
 Returns true if and only if *this and y are different. More...
 

Private Types

typedef std::vector< DB_Row< T > >::const_iterator Iter
 

Private Attributes

Iter i
 The const iterator on the rows' vector rows. More...
 

Detailed Description

template<typename T>
class Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator

A read-only iterator over the rows of the matrix.

Definition at line 96 of file DB_Matrix_defs.hh.

Member Typedef Documentation

template<typename T>
typedef std::iterator_traits<Iter>::difference_type Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::difference_type

Definition at line 106 of file DB_Matrix_defs.hh.

template<typename T>
typedef std::vector<DB_Row<T> >::const_iterator Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::Iter
private

Definition at line 98 of file DB_Matrix_defs.hh.

template<typename T>
typedef std::forward_iterator_tag Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::iterator_category

Definition at line 103 of file DB_Matrix_defs.hh.

template<typename T>
typedef std::iterator_traits<Iter>::pointer Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::pointer

Definition at line 107 of file DB_Matrix_defs.hh.

template<typename T>
typedef std::iterator_traits<Iter>::reference Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::reference

Definition at line 108 of file DB_Matrix_defs.hh.

template<typename T>
typedef std::iterator_traits<Iter>::value_type Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::value_type

Definition at line 104 of file DB_Matrix_defs.hh.

Constructor & Destructor Documentation

template<typename T >
Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::const_iterator ( )
inline

Default constructor.

Definition at line 64 of file DB_Matrix_inlines.hh.

65  : i(Iter()) {
66 }
Iter i
The const iterator on the rows' vector rows.
std::vector< DB_Row< T > >::const_iterator Iter
template<typename T >
Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::const_iterator ( const Iter b)
inlineexplicit

Builds a const iterator on the matrix starting from an iterator b on the elements of the vector rows.

Definition at line 70 of file DB_Matrix_inlines.hh.

71  : i(b) {
72 }
Iter i
The const iterator on the rows' vector rows.
template<typename T >
Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::const_iterator ( const const_iterator y)
inline

Ordinary copy constructor.

Definition at line 76 of file DB_Matrix_inlines.hh.

77  : i(y.i) {
78 }
Iter i
The const iterator on the rows' vector rows.

Member Function Documentation

template<typename T >
bool Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator!= ( const const_iterator y) const
inline

Returns true if and only if *this and y are different.

Definition at line 120 of file DB_Matrix_inlines.hh.

References Parma_Polyhedra_Library::DB_Matrix< T >::operator==().

120  {
121  return !operator==(y);
122 }
bool operator==(const const_iterator &y) const
Returns true if and only if *this and y are identical.
template<typename T >
DB_Matrix< T >::const_iterator::reference Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator* ( ) const
inline

Dereference operator.

Definition at line 89 of file DB_Matrix_inlines.hh.

89  {
90  return *i;
91 }
Iter i
The const iterator on the rows' vector rows.
template<typename T >
DB_Matrix< T >::const_iterator & Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator++ ( )
inline

Prefix increment operator.

Definition at line 101 of file DB_Matrix_inlines.hh.

101  {
102  ++i;
103  return *this;
104 }
Iter i
The const iterator on the rows' vector rows.
template<typename T >
DB_Matrix< T >::const_iterator Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator++ ( int  )
inline

Postfix increment operator.

Definition at line 108 of file DB_Matrix_inlines.hh.

108  {
109  return const_iterator(i++);
110 }
Iter i
The const iterator on the rows' vector rows.
template<typename T >
DB_Matrix< T >::const_iterator::pointer Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator-> ( ) const
inline

Indirect member selector.

Definition at line 95 of file DB_Matrix_inlines.hh.

95  {
96  return &*i;
97 }
Iter i
The const iterator on the rows' vector rows.
template<typename T >
DB_Matrix< T >::const_iterator & Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator= ( const const_iterator y)
inline

Assignment operator.

Definition at line 82 of file DB_Matrix_inlines.hh.

References Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::i.

82  {
83  i = y.i;
84  return *this;
85 }
Iter i
The const iterator on the rows' vector rows.
template<typename T >
bool Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::operator== ( const const_iterator y) const
inline

Returns true if and only if *this and y are identical.

Definition at line 114 of file DB_Matrix_inlines.hh.

References Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::i.

114  {
115  return i == y.i;
116 }
Iter i
The const iterator on the rows' vector rows.

Member Data Documentation

template<typename T>
Iter Parma_Polyhedra_Library::DB_Matrix< T >::const_iterator::i
private

The documentation for this class was generated from the following files: