casacore
Public Types | Public Member Functions | Protected Attributes | List of all members
casacore::VectorSTLIterator< T, Alloc > Class Template Reference

More...

#include <VectorSTLIterator.h>

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, Alloc > &c)
 Constructors. More...
 
 VectorSTLIterator ()
 
 VectorSTLIterator (const typename Array< T, Alloc >::IteratorSTL &c)
 
reference operator[] (size_t i)
 Access. More...
 
const_reference operator[] (size_t i) const
 
reference operator* ()
 
const_reference operator* () const
 
pointer pos () const
 
const iteratoroperator++ ()
 Manipulation. More...
 
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, Alloc > &x) const
 Size related. More...
 
bool operator== (const iterator &other) const
 Comparisons. More...
 
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) More...
 
difference_type step_p
 Distance between elements. More...
 
pointer iter_p
 Current element pointer. More...
 

Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class casacore::VectorSTLIterator< T, Alloc >

Casacore Vector iterator

Review Status

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

Synopsis

This class creates a random access STL iterator for an Casacore 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

◆ const_iterator

template<typename T , typename Alloc = std::allocator<T>>
typedef const VectorSTLIterator<T> casacore::VectorSTLIterator< T, Alloc >::const_iterator

Definition at line 73 of file VectorSTLIterator.h.

◆ const_pointer

template<typename T , typename Alloc = std::allocator<T>>
typedef const value_type* casacore::VectorSTLIterator< T, Alloc >::const_pointer

Definition at line 71 of file VectorSTLIterator.h.

◆ const_reference

template<typename T , typename Alloc = std::allocator<T>>
typedef const value_type& casacore::VectorSTLIterator< T, Alloc >::const_reference

Definition at line 75 of file VectorSTLIterator.h.

◆ difference_type

template<typename T , typename Alloc = std::allocator<T>>
typedef ptrdiff_t casacore::VectorSTLIterator< T, Alloc >::difference_type

Definition at line 77 of file VectorSTLIterator.h.

◆ iterator

template<typename T , typename Alloc = std::allocator<T>>
typedef VectorSTLIterator<T> casacore::VectorSTLIterator< T, Alloc >::iterator

Definition at line 72 of file VectorSTLIterator.h.

◆ pointer

template<typename T , typename Alloc = std::allocator<T>>
typedef value_type* casacore::VectorSTLIterator< T, Alloc >::pointer

Definition at line 70 of file VectorSTLIterator.h.

◆ reference

template<typename T , typename Alloc = std::allocator<T>>
typedef value_type& casacore::VectorSTLIterator< T, Alloc >::reference

Definition at line 74 of file VectorSTLIterator.h.

◆ size_type

template<typename T , typename Alloc = std::allocator<T>>
typedef std::size_t casacore::VectorSTLIterator< T, Alloc >::size_type

Definition at line 76 of file VectorSTLIterator.h.

◆ value_type

template<typename T , typename Alloc = std::allocator<T>>
typedef T casacore::VectorSTLIterator< T, Alloc >::value_type

Definition at line 69 of file VectorSTLIterator.h.

Constructor & Destructor Documentation

◆ VectorSTLIterator() [1/3]

template<typename T , typename Alloc = std::allocator<T>>
casacore::VectorSTLIterator< T, Alloc >::VectorSTLIterator ( const Vector< T, Alloc > &  c)
inlineexplicit

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.

◆ VectorSTLIterator() [2/3]

template<typename T , typename Alloc = std::allocator<T>>
casacore::VectorSTLIterator< T, Alloc >::VectorSTLIterator ( )
inline

Definition at line 87 of file VectorSTLIterator.h.

◆ VectorSTLIterator() [3/3]

template<typename T , typename Alloc = std::allocator<T>>
casacore::VectorSTLIterator< T, Alloc >::VectorSTLIterator ( const typename Array< T, Alloc >::IteratorSTL &  c)
inline

Definition at line 89 of file VectorSTLIterator.h.

Member Function Documentation

◆ operator!=() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
bool casacore::VectorSTLIterator< T, Alloc >::operator!= ( const iterator  other) const
inline

◆ operator!=() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
bool casacore::VectorSTLIterator< T, Alloc >::operator!= ( const_pointer const  pos) const
inline

◆ operator*() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
reference casacore::VectorSTLIterator< T, Alloc >::operator* ( )
inline

◆ operator*() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
const_reference casacore::VectorSTLIterator< T, Alloc >::operator* ( ) const
inline

◆ operator+()

template<typename T , typename Alloc = std::allocator<T>>
iterator casacore::VectorSTLIterator< T, Alloc >::operator+ ( difference_type  i) const
inline

Definition at line 116 of file VectorSTLIterator.h.

◆ operator++() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
const iterator& casacore::VectorSTLIterator< T, Alloc >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
iterator casacore::VectorSTLIterator< T, Alloc >::operator++ ( int  )
inline

◆ operator+=()

template<typename T , typename Alloc = std::allocator<T>>
iterator& casacore::VectorSTLIterator< T, Alloc >::operator+= ( difference_type  i)
inline

◆ operator-() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
difference_type casacore::VectorSTLIterator< T, Alloc >::operator- ( const VectorSTLIterator< T, Alloc > &  x) const
inline

◆ operator-() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
iterator casacore::VectorSTLIterator< T, Alloc >::operator- ( difference_type  i) const
inline

Definition at line 118 of file VectorSTLIterator.h.

◆ operator--() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
iterator& casacore::VectorSTLIterator< T, Alloc >::operator-- ( )
inline

◆ operator--() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
iterator casacore::VectorSTLIterator< T, Alloc >::operator-- ( int  )
inline

◆ operator-=()

template<typename T , typename Alloc = std::allocator<T>>
iterator& casacore::VectorSTLIterator< T, Alloc >::operator-= ( difference_type  i)
inline

◆ operator<() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
bool casacore::VectorSTLIterator< T, Alloc >::operator< ( const iterator other) const
inline

◆ operator<() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
bool casacore::VectorSTLIterator< T, Alloc >::operator< ( const_pointer const  pos) const
inline

◆ operator==() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
bool casacore::VectorSTLIterator< T, Alloc >::operator== ( const iterator other) const
inline

Comparisons.

Definition at line 128 of file VectorSTLIterator.h.

References casacore::VectorSTLIterator< T, Alloc >::iter_p.

◆ operator==() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
bool casacore::VectorSTLIterator< T, Alloc >::operator== ( const_pointer const  pos) const
inline

◆ operator[]() [1/2]

template<typename T , typename Alloc = std::allocator<T>>
reference casacore::VectorSTLIterator< T, Alloc >::operator[] ( size_t  i)
inline

◆ operator[]() [2/2]

template<typename T , typename Alloc = std::allocator<T>>
const_reference casacore::VectorSTLIterator< T, Alloc >::operator[] ( size_t  i) const
inline

◆ pos()

template<typename T , typename Alloc = std::allocator<T>>
pointer casacore::VectorSTLIterator< T, Alloc >::pos ( ) const
inline

Member Data Documentation

◆ iter_p

template<typename T , typename Alloc = std::allocator<T>>
pointer casacore::VectorSTLIterator< T, Alloc >::iter_p
protected

◆ start_p

template<typename T , typename Alloc = std::allocator<T>>
pointer const casacore::VectorSTLIterator< T, Alloc >::start_p
protected

Start (for random indexing)

Definition at line 143 of file VectorSTLIterator.h.

Referenced by casacore::VectorSTLIterator< T, Alloc >::operator[]().

◆ step_p

template<typename T , typename Alloc = std::allocator<T>>
difference_type casacore::VectorSTLIterator< T, Alloc >::step_p
protected

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