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 123 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 126 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 129 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 143 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 144 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 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 146 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 147 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 116 of file iterator_to_const.inlines.hh.

00117   : base(b) {
00118 }

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

Default constructor.

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

00104   : base() {
00105 }

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 110 of file iterator_to_const.inlines.hh.

00111   : base(y.base) {
00112 }

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 179 of file iterator_to_const.inlines.hh.

00180   : base(y.base) {
00181 }


Member Function Documentation

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 122 of file iterator_to_const.inlines.hh.

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

00122                                                     {
00123   return *base;
00124 }

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 128 of file iterator_to_const.inlines.hh.

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

00128                                                      {
00129   return &*base;
00130 }

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

Prefix increment operator.

Definition at line 134 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++().

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

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 141 of file iterator_to_const.inlines.hh.

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

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

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

Prefix decrement operator.

Definition at line 149 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--().

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

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 156 of file iterator_to_const.inlines.hh.

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

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

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 165 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!=().

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

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 172 of file iterator_to_const.inlines.hh.

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

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


Friends And Related Function Documentation

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

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

template<typename Container>
friend class Powerset [friend]

Definition at line 138 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 identical to y.

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

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

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 194 of file iterator_to_const.inlines.hh.

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


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 Sat Oct 11 10:41:13 2008 for PPL by  doxygen 1.5.6