Parma_Polyhedra_Library::const_iterator_to_const< Container > Class Template Reference
[C++ Language Interface]

A const_iterator on a sequence of read-only objects. More...

#include <iterator_to_const.defs.hh>

List of all members.

Public Types

typedef Traits::iterator_category iterator_category
typedef Traits::value_type value_type
typedef Traits::difference_type difference_type
typedef Traits::pointer pointer
typedef Traits::reference reference

Public Member Functions

 const_iterator_to_const ()
 Default constructor.
 const_iterator_to_const (const const_iterator_to_const &y)
 Copy constructor.
 const_iterator_to_const (const iterator_to_const< Container > &y)
 Constructs from the corresponding non-const iterator.
reference operator* () const
 Dereference operator.
pointer operator-> () const
 Indirect member selector.
const_iterator_to_constoperator++ ()
 Prefix increment operator.
const_iterator_to_const operator++ (int)
 Postfix increment operator.
const_iterator_to_constoperator-- ()
 Prefix decrement operator.
const_iterator_to_const operator-- (int)
 Postfix decrement operator.
bool operator== (const const_iterator_to_const &y) const
 Returns true if and only if *this and y are identical.
bool operator!= (const const_iterator_to_const &y) const
 Returns true if and only if *this and y are different.

Private Types

typedef Container::const_iterator Base
 The type of the underlying const_iterator.
typedef std::iterator_traits
< Base
Traits
 A shortcut for naming traits.

Private Member Functions

 const_iterator_to_const (const Base &b)
 Constructs from the lower-level const_iterator.

Private Attributes

Base base
 A const_iterator on the sequence of elements.

Friends

class iterator_to_const< Container >
class Powerset

Related Functions

(Note that these are not member functions.)



template<typename Container >
bool operator== (const iterator_to_const< Container > &x, const const_iterator_to_const< Container > &y)
 Mixed comparison operator: returns true if and only if (the const version of) x is identical to y.
template<typename Container >
bool operator!= (const iterator_to_const< Container > &x, const const_iterator_to_const< Container > &y)
 Mixed comparison operator: returns true if and only if (the const version of) x is different from y.

Detailed Description

template<typename Container>
class Parma_Polyhedra_Library::const_iterator_to_const< Container >

A const_iterator on a sequence of read-only objects.

This class, besides implementing a read-only bidirectional iterator on a read-only sequence of objects, ensures interoperability with template class iterator_to_const.

Definition at line 125 of file iterator_to_const.defs.hh.


Member Typedef Documentation

template<typename Container>
typedef Container::const_iterator Parma_Polyhedra_Library::const_iterator_to_const< Container >::Base [private]

The type of the underlying const_iterator.

Definition at line 128 of file iterator_to_const.defs.hh.

template<typename Container>
typedef Traits::difference_type Parma_Polyhedra_Library::const_iterator_to_const< Container >::difference_type

Definition at line 147 of file iterator_to_const.defs.hh.

template<typename Container>
typedef Traits::iterator_category Parma_Polyhedra_Library::const_iterator_to_const< Container >::iterator_category

Definition at line 145 of file iterator_to_const.defs.hh.

template<typename Container>
typedef Traits::pointer Parma_Polyhedra_Library::const_iterator_to_const< Container >::pointer

Definition at line 148 of file iterator_to_const.defs.hh.

template<typename Container>
typedef Traits::reference Parma_Polyhedra_Library::const_iterator_to_const< Container >::reference

Definition at line 149 of file iterator_to_const.defs.hh.

template<typename Container>
typedef std::iterator_traits<Base> Parma_Polyhedra_Library::const_iterator_to_const< Container >::Traits [private]

A shortcut for naming traits.

Definition at line 131 of file iterator_to_const.defs.hh.

template<typename Container>
typedef Traits::value_type Parma_Polyhedra_Library::const_iterator_to_const< Container >::value_type

Definition at line 146 of file iterator_to_const.defs.hh.


Constructor & Destructor Documentation

template<typename Container >
Parma_Polyhedra_Library::const_iterator_to_const< Container >::const_iterator_to_const ( const Base b  )  [inline, private]

Constructs from the lower-level const_iterator.

Definition at line 117 of file iterator_to_const.inlines.hh.

00118   : base(b) {
00119 }

template<typename Container >
Parma_Polyhedra_Library::const_iterator_to_const< Container >::const_iterator_to_const (  )  [inline]

Default constructor.

Definition at line 104 of file iterator_to_const.inlines.hh.

00105   : base() {
00106 }

template<typename Container >
Parma_Polyhedra_Library::const_iterator_to_const< Container >::const_iterator_to_const ( const const_iterator_to_const< Container > &  y  )  [inline]

Copy constructor.

Definition at line 111 of file iterator_to_const.inlines.hh.

00112   : base(y.base) {
00113 }

template<typename Container>
Parma_Polyhedra_Library::const_iterator_to_const< Container >::const_iterator_to_const ( const iterator_to_const< Container > &  y  )  [inline]

Constructs from the corresponding non-const iterator.

Definition at line 180 of file iterator_to_const.inlines.hh.

00181   : base(y.base) {
00182 }


Member Function Documentation

template<typename Container >
bool Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator!= ( const const_iterator_to_const< Container > &  y  )  const [inline]

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

Definition at line 173 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::operator==().

00173                                                    {
00174   return !operator==(y);
00175 }

template<typename Container >
const_iterator_to_const< Container >::reference Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator* (  )  const [inline]

Dereference operator.

Definition at line 123 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::base.

00123                                                     {
00124   return *base;
00125 }

template<typename Container >
const_iterator_to_const< Container > Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator++ ( int   )  [inline]

Postfix increment operator.

Definition at line 142 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator++().

00142                                                   {
00143   const_iterator_to_const tmp = *this;
00144   operator++();
00145   return tmp;
00146 }

template<typename Container >
const_iterator_to_const< Container > & Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator++ (  )  [inline]

Prefix increment operator.

Definition at line 135 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::base.

Referenced by Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator++().

00135                                                {
00136   ++base;
00137   return *this;
00138 }

template<typename Container >
const_iterator_to_const< Container > Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator-- ( int   )  [inline]

Postfix decrement operator.

Definition at line 157 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator--().

00157                                                   {
00158   const_iterator_to_const tmp = *this;
00159   operator--();
00160   return tmp;
00161 }

template<typename Container >
const_iterator_to_const< Container > & Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator-- (  )  [inline]

Prefix decrement operator.

Definition at line 150 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::base.

Referenced by Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator--().

00150                                                {
00151   --base;
00152   return *this;
00153 }

template<typename Container >
const_iterator_to_const< Container >::pointer Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator-> (  )  const [inline]

Indirect member selector.

Definition at line 129 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::base.

00129                                                      {
00130   return &*base;
00131 }

template<typename Container >
bool Parma_Polyhedra_Library::const_iterator_to_const< Container >::operator== ( const const_iterator_to_const< Container > &  y  )  const [inline]

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

Definition at line 166 of file iterator_to_const.inlines.hh.

References Parma_Polyhedra_Library::const_iterator_to_const< Container >::base.

00166                                                    {
00167   return base == y.base;
00168 }


Friends And Related Function Documentation

template<typename Container>
friend class iterator_to_const< Container > [friend]

Definition at line 139 of file iterator_to_const.defs.hh.

template<typename Container >
bool operator!= ( const iterator_to_const< Container > &  x,
const const_iterator_to_const< Container > &  y 
) [related]

Mixed comparison operator: returns true if and only if (the const version of) x is different from y.

Definition at line 195 of file iterator_to_const.inlines.hh.

00196                                                         {
00197   return !(x == y);
00198 }

template<typename Container >
bool operator== ( const iterator_to_const< Container > &  x,
const const_iterator_to_const< Container > &  y 
) [related]

Mixed comparison operator: returns true if and only if (the const version of) x is identical to y.

Definition at line 187 of file iterator_to_const.inlines.hh.

00188                                                         {
00189   return const_iterator_to_const<Container>(x).operator==(y);
00190 }

template<typename Container>
friend class Powerset [friend]

Definition at line 140 of file iterator_to_const.defs.hh.


Member Data Documentation

template<typename Container>
Base Parma_Polyhedra_Library::const_iterator_to_const< Container >::base [private]

The documentation for this class was generated from the following files:
Generated on Sun Feb 27 16:20:29 2011 for PPL by  doxygen 1.6.3