casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Attributes
casa::VectorSTLIterator< T > Class Template Reference

AIPS++ Vector iterator. More...

#include <VectorSTLIterator.h>

List of all members.

Public Types

typedef T value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef VectorSTLIterator< T > iterator
typedef const
VectorSTLIterator< T > 
const_iterator
typedef value_typereference
typedef const value_typeconst_reference
typedef std::size_t size_type
typedef ptrdiff_t difference_type

Public Member Functions

 VectorSTLIterator (const Vector< T > &c)
 Constructors.
 VectorSTLIterator ()
 VectorSTLIterator (const typename Array< T >::IteratorSTL &c)
 VectorSTLIterator (const VectorSTLIterator< T > &that)
 Copy constructor.
VectorSTLIterator< T > & operator= (const VectorSTLIterator< T > &that)
 Assignment.
 ~VectorSTLIterator ()
 Destructor.
reference operator[] (uInt i)
 Access.
const_reference operator[] (uInt i) const
reference operator* ()
const_reference operator* () const
pointer pos () const
const iteratoroperator++ ()
 Manipulation.
iterator operator++ (int)
iteratoroperator-- ()
iterator operator-- (int)
iteratoroperator+= (difference_type i)
iteratoroperator-= (difference_type i)
iterator operator+ (difference_type i) const
iterator operator- (difference_type i) const
difference_type operator- (const VectorSTLIterator< T > &x) const
 Size related.
Bool operator== (const iterator &other) const
 Comparisons.
Bool operator!= (const iterator other) const
Bool operator< (const iterator &other) const
Bool operator== (const_pointer const pos) const
Bool operator!= (const_pointer const pos) const
Bool operator< (const_pointer const pos) const

Protected Attributes

pointer const start_p
 Start (for random indexing)
difference_type step_p
 Distance between elements.
pointer iter_p
 Current element pointer.

Detailed Description

template<class T>
class casa::VectorSTLIterator< T >

AIPS++ Vector iterator.

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

This class creates a random access STL iterator for an aips++ Vector. All the STL functionality is present (or if something missing can be easily added).
The following comments hold:

Definition at line 66 of file VectorSTLIterator.h.


Member Typedef Documentation

template<class T>
typedef const VectorSTLIterator<T> casa::VectorSTLIterator< T >::const_iterator

Definition at line 73 of file VectorSTLIterator.h.

template<class T>
typedef const value_type* casa::VectorSTLIterator< T >::const_pointer

Definition at line 71 of file VectorSTLIterator.h.

template<class T>
typedef const value_type& casa::VectorSTLIterator< T >::const_reference

Definition at line 75 of file VectorSTLIterator.h.

template<class T>
typedef ptrdiff_t casa::VectorSTLIterator< T >::difference_type

Definition at line 77 of file VectorSTLIterator.h.

template<class T>
typedef VectorSTLIterator<T> casa::VectorSTLIterator< T >::iterator

Definition at line 72 of file VectorSTLIterator.h.

template<class T>
typedef value_type* casa::VectorSTLIterator< T >::pointer

Definition at line 70 of file VectorSTLIterator.h.

template<class T>
typedef value_type& casa::VectorSTLIterator< T >::reference

Definition at line 74 of file VectorSTLIterator.h.

template<class T>
typedef std::size_t casa::VectorSTLIterator< T >::size_type

Definition at line 76 of file VectorSTLIterator.h.

template<class T>
typedef T casa::VectorSTLIterator< T >::value_type

Definition at line 69 of file VectorSTLIterator.h.


Constructor & Destructor Documentation

template<class T>
casa::VectorSTLIterator< T >::VectorSTLIterator ( const Vector< T > &  c) [inline, explicit]

Constructors.

The iterator constructor from a Vector is the same as if created from Vector.begin(). Copy constructor and assignment can be the default ones.

Definition at line 82 of file VectorSTLIterator.h.

template<class T>
casa::VectorSTLIterator< T >::VectorSTLIterator ( ) [inline]

Definition at line 87 of file VectorSTLIterator.h.

template<class T>
casa::VectorSTLIterator< T >::VectorSTLIterator ( const typename Array< T >::IteratorSTL &  c) [inline]

Definition at line 89 of file VectorSTLIterator.h.

template<class T>
casa::VectorSTLIterator< T >::VectorSTLIterator ( const VectorSTLIterator< T > &  that) [inline]

Copy constructor.

Definition at line 96 of file VectorSTLIterator.h.

template<class T>
casa::VectorSTLIterator< T >::~VectorSTLIterator ( ) [inline]

Destructor.

Definition at line 115 of file VectorSTLIterator.h.


Member Function Documentation

template<class T>
Bool casa::VectorSTLIterator< T >::operator!= ( const iterator  other) const [inline]

Definition at line 151 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p.

template<class T>
Bool casa::VectorSTLIterator< T >::operator!= ( const_pointer const  pos) const [inline]
template<class T>
reference casa::VectorSTLIterator< T >::operator* ( ) [inline]

Definition at line 121 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p.

template<class T>
const_reference casa::VectorSTLIterator< T >::operator* ( ) const [inline]

Definition at line 122 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p.

template<class T>
iterator casa::VectorSTLIterator< T >::operator+ ( difference_type  i) const [inline]

Definition at line 137 of file VectorSTLIterator.h.

template<class T>
const iterator& casa::VectorSTLIterator< T >::operator++ ( ) [inline]

Manipulation.

Definition at line 127 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p, and casa::VectorSTLIterator< T >::step_p.

template<class T>
iterator casa::VectorSTLIterator< T >::operator++ ( int  ) [inline]
template<class T>
iterator& casa::VectorSTLIterator< T >::operator+= ( difference_type  i) [inline]
template<class T>
iterator casa::VectorSTLIterator< T >::operator- ( difference_type  i) const [inline]

Definition at line 139 of file VectorSTLIterator.h.

template<class T>
difference_type casa::VectorSTLIterator< T >::operator- ( const VectorSTLIterator< T > &  x) const [inline]

Size related.

Definition at line 144 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p, and casa::VectorSTLIterator< T >::step_p.

template<class T>
iterator& casa::VectorSTLIterator< T >::operator-- ( ) [inline]
template<class T>
iterator casa::VectorSTLIterator< T >::operator-- ( int  ) [inline]
template<class T>
iterator& casa::VectorSTLIterator< T >::operator-= ( difference_type  i) [inline]
template<class T>
Bool casa::VectorSTLIterator< T >::operator< ( const iterator other) const [inline]

Definition at line 153 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p.

template<class T>
Bool casa::VectorSTLIterator< T >::operator< ( const_pointer const  pos) const [inline]

Definition at line 159 of file VectorSTLIterator.h.

template<class T>
VectorSTLIterator<T>& casa::VectorSTLIterator< T >::operator= ( const VectorSTLIterator< T > &  that) [inline]
template<class T>
Bool casa::VectorSTLIterator< T >::operator== ( const iterator other) const [inline]

Comparisons.

Definition at line 149 of file VectorSTLIterator.h.

References casa::VectorSTLIterator< T >::iter_p.

template<class T>
Bool casa::VectorSTLIterator< T >::operator== ( const_pointer const  pos) const [inline]
template<class T>
reference casa::VectorSTLIterator< T >::operator[] ( uInt  i) [inline]
template<class T>
const_reference casa::VectorSTLIterator< T >::operator[] ( uInt  i) const [inline]
template<class T>
pointer casa::VectorSTLIterator< T >::pos ( ) const [inline]

Member Data Documentation

template<class T>
pointer casa::VectorSTLIterator< T >::iter_p [protected]
template<class T>
pointer const casa::VectorSTLIterator< T >::start_p [protected]

Start (for random indexing)

Definition at line 160 of file VectorSTLIterator.h.

Referenced by casa::VectorSTLIterator< T >::operator=(), and casa::VectorSTLIterator< T >::operator[]().

template<class T>
difference_type casa::VectorSTLIterator< T >::step_p [protected]

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