idaeim studio
 PVL: Parameter Value Language

Public Member Functions | Friends
Vectal< T >::Const_Iterator Class Reference

A Const_Iterator provides a random access iterator for a const Vectal. More...

#include <Vectal.hh>

List of all members.

Public Member Functions

 Const_Iterator ()
 Constructs an uninitialized Const_Iterator.
 Const_Iterator (const Const_Iterator &other_iterator)
 Constructs a copy of another Const_Iterator.
 Const_Iterator (const Base_const_iterator &base_iterator)
 Constructs an Const_Iterator from a Base_const_iterator.
 Const_Iterator (const Iterator &other_iterator)
 Constructs a Const_Iterator from an Iterator.
 operator Base_const_iterator ()
 Type conversion operator to Base_const_iterator.
bool operator!= (const Const_Iterator &other_iterator) const
 Inequality operator.
const T & operator* () const
 Dereference operator.
Const_Iterator operator+ (int distance)
 Provides an Const_Iterator moved backward some distance from the position of this Const_Iterator.
Const_Iteratoroperator++ ()
 Pre-increment operator.
Const_Iterator operator++ (int)
 Post-increment operator.
Const_Iteratoroperator+= (int distance)
 Moves the Const_Iterator position forward some distance from the position of this Const_Iterator.
Const_Iterator operator- (int distance)
 Provides an Const_Iterator moved backward some distance from the position of this Const_Iterator.
Const_Iterator::difference_type operator- (const Const_Iterator &other_iterator) const
 Distance operator.
Const_Iteratoroperator-- ()
 Pre-decrement operator.
Const_Iterator operator-- (int)
 Post-decrement operator.
Const_Iteratoroperator-= (int distance)
 Moves the Const_Iterator position backward some distance from the position of this Const_Iterator.
T * operator-> () const
 Member dereference (pointer) operator.
bool operator< (const Const_Iterator &other_iterator) const
 Less than operator.
bool operator<= (const Const_Iterator &other_iterator) const
 Less than or equal to operator.
Const_Iteratoroperator= (const Const_Iterator &other_iterator)
 Assignment operator.
Const_Iteratoroperator= (const Iterator &other_iterator)
 Assignment operator from Iterator.
bool operator== (const Const_Iterator &other_iterator) const
 Equality operator.
bool operator> (const Const_Iterator &other_iterator) const
 Greater than operator.
bool operator>= (const Const_Iterator &other_iterator) const
 Greater than or equal to operator.
const T & operator[] (size_type index) const
 Array reference operator.

Friends

class Const_Reverse_Iterator
bool operator!= (const Base_const_iterator &base_iterator, const Const_Iterator &other_iterator)
 Inequality operator with a Base_const_iterator.

Detailed Description

template<typename T>
class idaeim::Vectal< T >::Const_Iterator

A Const_Iterator provides a random access iterator for a const Vectal.

A Const_Iterator operates the same as the Base_iterator - an interator over a vector of pointer objects - that provides the backing implementation, except that reference semantics are provided to the object pointed to rather that to the pointer.


Constructor & Destructor Documentation

Const_Iterator ( ) [inline]

Constructs an uninitialized Const_Iterator.

N.B.: The iterator is invalid until assigned.

Const_Iterator ( const Const_Iterator other_iterator) [inline]

Constructs a copy of another Const_Iterator.

Parameters:
other_iteratorA Const_Iterator to be copied.
Const_Iterator ( const Iterator other_iterator) [inline]

Constructs a Const_Iterator from an Iterator.

Parameters:
other_iteratorAn Iterator to be copied.
Const_Iterator ( const Base_const_iterator base_iterator) [inline]

Constructs an Const_Iterator from a Base_const_iterator.

Implements implicit type conversion.

Parameters:
base_iteratorA Base_const_iterator from which to construct this Const_Iterator.

Member Function Documentation

Const_Iterator& operator= ( const Const_Iterator other_iterator) [inline]

Assignment operator.

Parameters:
other_iteratorA Const_Iterator to be assigned to this Const_Iterator.
Returns:
This Const_Iterator.
Const_Iterator& operator= ( const Iterator other_iterator) [inline]

Assignment operator from Iterator.

Parameters:
other_iteratorAn Iterator to be assigned to this Const_Iterator.
Returns:
This Const_Iterator.
operator Base_const_iterator ( ) [inline]

Type conversion operator to Base_const_iterator.

The backing Base_const_iterator for this Const_Iterator is returned.

const T& operator* ( ) const [inline]

Dereference operator.

Reference semantics are implemented, even though the backing Base_const_iterator operates on pointer objects.

Returns:
A const reference to the value at this Const_Iterator's current position.
T* operator-> ( ) const [inline]

Member dereference (pointer) operator.

The semantics for a container of objects of type T are implemented, even though the backing Base_const_iterator operates on a container of pointers to objects of type T.

Returns:
A pointer to the value at this Const_Iterator's current position.
const T& operator[] ( size_type  index) const [inline]

Array reference operator.

Parameters:
indexAn element index of a value in the Vectal. N.B.: The validity of the index is not checked.
Returns:
A const reference to the value at the Vectal index.
Const_Iterator& operator++ ( ) [inline]

Pre-increment operator.

Returns:
A reference to this Const_Iterator after its position has been incremented.
Const_Iterator operator++ ( int  ) [inline]

Post-increment operator.

This Const_Iterator is incremented to the next position after a copy of this Const_Iterator has been made.

Returns:
A copy of this Const_Iterator at its original position.
Const_Iterator& operator-- ( ) [inline]

Pre-decrement operator.

Returns:
A reference to this Const_Iterator after its position has been decremented.
Const_Iterator operator-- ( int  ) [inline]

Post-decrement operator.

This Const_Iterator is decremented to the previous position after a copy of this Const_Iterator has been made.

Returns:
A copy of this Const_Iterator at its original position.
Const_Iterator& operator+= ( int  distance) [inline]

Moves the Const_Iterator position forward some distance from the position of this Const_Iterator.

Parameters:
distanceThe distance (number of values) to move.
Returns:
This Const_Iterator.
Const_Iterator operator+ ( int  distance) [inline]

Provides an Const_Iterator moved backward some distance from the position of this Const_Iterator.

A copy of this Const_Iterator is made and the copy is repositioned.

Parameters:
distanceThe distance - number of values - to move.
Returns:
A copy of this Const_Iterator at the new position.
Const_Iterator& operator-= ( int  distance) [inline]

Moves the Const_Iterator position backward some distance from the position of this Const_Iterator.

Parameters:
distanceThe distance - number of values - to move.
Returns:
This Const_Iterator.
Const_Iterator operator- ( int  distance) [inline]

Provides an Const_Iterator moved backward some distance from the position of this Const_Iterator.

A copy of this Const_Iterator is made and the copy is repositioned.

Parameters:
distanceThe distance - number of values - to move.
Returns:
A copy of this Const_Iterator at the new position.
Const_Iterator::difference_type operator- ( const Const_Iterator other_iterator) const [inline]

Distance operator.

Parameters:
other_iteratorAnother Const_Iterator from which to obtain the distance from this Const_Iterator.
Returns:
The distance, in values, between this and the other Const_Iterator.
bool operator== ( const Const_Iterator other_iterator) const [inline]

Equality operator.

Parameters:
other_iteratorAnother Const_Iterator to compare with this Const_Iterator.
Returns:
true if the Const_Iterators are equal; false otherwise.
bool operator!= ( const Const_Iterator other_iterator) const [inline]

Inequality operator.

Parameters:
other_iteratorAnother Const_Iterator to compare with this Const_Iterator.
Returns:
true if the Const_Iterators are not equal; false otherwise.
bool operator< ( const Const_Iterator other_iterator) const [inline]

Less than operator.

Parameters:
other_iteratorAnother Const_Iterator to compare with this Const_Iterator.
Returns:
true if this Const_Iterator is at a position before (less than) the position of the other Const_Iterator; false otherwise.
bool operator<= ( const Const_Iterator other_iterator) const [inline]

Less than or equal to operator.

Parameters:
other_iteratorAnother Const_Iterator to compare with this Const_Iterator.
Returns:
true if this Const_Iterator is not at a position after the position of the other Const_Iterator; false otherwise.
bool operator> ( const Const_Iterator other_iterator) const [inline]

Greater than operator.

Parameters:
other_iteratorAnother Const_Iterator to compare with this Const_Iterator.
Returns:
true if this Const_Iterator is at a position after (greater than) the position of the other Const_Iterator; false otherwise.
bool operator>= ( const Const_Iterator other_iterator) const [inline]

Greater than or equal to operator.

Parameters:
other_iteratorAnother Const_Iterator to compare with this Const_Iterator.
Returns:
true if this Const_Iterator is not at a position before the position of the other Const_Iterator; false otherwise.

Friends And Related Function Documentation

friend class Const_Reverse_Iterator [friend]
bool operator!= ( const Base_const_iterator base_iterator,
const Const_Iterator other_iterator 
) [friend]

Inequality operator with a Base_const_iterator.

Parameters:
base_iteratorA Base_const_iterator to compare with another Const_Iterator.
other_iteratorAnother Const_Iterator to compare with the Base_const_iterator.
Returns:
true if the iterators are not equal; false otherwise.

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