marray::Iterator< T, isConst, A > Class Template Reference

STL-compliant random access iterator for View and Marray. More...

#include <marray.hxx>

Collaboration diagram for marray::Iterator< T, isConst, A >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
std::random_access_iterator_tag 
iterator_category
typedef T value_type
typedef ptrdiff_t difference_type
typedef marray_detail::IfBool
< isConst, const T *, T * >
::type 
pointer
typedef marray_detail::IfBool
< isConst, const T &, T & >
::type 
reference
typedef marray_detail::IfBool
< isConst, const View< T, true,
A > *, View< T, false, A >
* >::type 
view_pointer
typedef marray_detail::IfBool
< isConst, const View< T, true,
A > &, View< T, false, A >
& >::type 
view_reference

Public Member Functions

 Iterator ()
 Empty constructor.
 Iterator (const View< T, false, A > &, const size_t=0)
 Construct from View on mutable data.
 Iterator (View< T, false, A > &, const size_t=0)
 Construct from View on mutable data.
 Iterator (const View< T, true, A > &, const size_t=0)
 Construct from View on constant data.
 Iterator (const Iterator< T, false, A > &)
 Copy constructor or conversion from an Iterator on mutable data.
reference operator* () const
 De-reference.
pointer operator-> () const
 Pointer.
reference operator[] (const size_t) const
 Element access.
Iterator< T, isConst, A > & operator+= (const difference_type &)
Iterator< T, isConst, A > & operator-= (const difference_type &)
Iterator< T, isConst, A > & operator++ ()
 Prefix increment.
Iterator< T, isConst, A > & operator-- ()
 Prefix decrement.
Iterator< T, isConst, A > operator++ (int)
 Postfix increment.
Iterator< T, isConst, A > operator-- (int)
 Postfix decrement.
Iterator< T, isConst, A > operator+ (const difference_type &) const
Iterator< T, isConst, A > operator- (const difference_type &) const
template<bool isConstLocal>
difference_type operator- (const Iterator< T, isConstLocal, A > &) const
template<bool isConstLocal>
bool operator== (const Iterator< T, isConstLocal, A > &) const
template<bool isConstLocal>
bool operator!= (const Iterator< T, isConstLocal, A > &) const
template<bool isConstLocal>
bool operator< (const Iterator< T, isConstLocal, A > &) const
template<bool isConstLocal>
bool operator> (const Iterator< T, isConstLocal, A > &) const
template<bool isConstLocal>
bool operator<= (const Iterator< T, isConstLocal, A > &) const
template<bool isConstLocal>
bool operator>= (const Iterator< T, isConstLocal, A > &) const
bool hasMore () const
 Fast alternative to comparing with the end iterator.
size_t index () const
 Get the corresponding index in the View.
template<class CoordinateIterator >
void coordinate (CoordinateIterator) const
 Get the corresponding coordinate sequence in the View.

Detailed Description

template<class T, bool isConst, class A>
class marray::Iterator< T, isConst, A >

STL-compliant random access iterator for View and Marray.

In addition to the STL iterator interface, the member functions hasMore(), index(), and coordinate() are defined.

Definition at line 469 of file marray.hxx.


Member Typedef Documentation

template<class T, bool isConst, class A>
typedef ptrdiff_t marray::Iterator< T, isConst, A >::difference_type

Definition at line 479 of file marray.hxx.

template<class T, bool isConst, class A>
typedef std::random_access_iterator_tag marray::Iterator< T, isConst, A >::iterator_category

Definition at line 473 of file marray.hxx.

template<class T, bool isConst, class A>
typedef marray_detail::IfBool<isConst, const T*, T*>::type marray::Iterator< T, isConst, A >::pointer

Definition at line 481 of file marray.hxx.

template<class T, bool isConst, class A>
typedef marray_detail::IfBool<isConst, const T&, T&>::type marray::Iterator< T, isConst, A >::reference

Definition at line 482 of file marray.hxx.

template<class T, bool isConst, class A>
typedef T marray::Iterator< T, isConst, A >::value_type

Definition at line 474 of file marray.hxx.

template<class T, bool isConst, class A>
typedef marray_detail::IfBool<isConst, const View<T, true, A>*, View<T, false, A>*>::type marray::Iterator< T, isConst, A >::view_pointer

Definition at line 486 of file marray.hxx.

template<class T, bool isConst, class A>
typedef marray_detail::IfBool<isConst, const View<T, true, A>&, View<T, false, A>&>::type marray::Iterator< T, isConst, A >::view_reference

Definition at line 488 of file marray.hxx.


Constructor & Destructor Documentation

template<class T , bool isConst, class A >
marray::Iterator< T, isConst, A >::Iterator (  )  [inline]

Empty constructor.

Definition at line 4032 of file marray.hxx.

template<class T, bool isConst, class A>
marray::Iterator< T, isConst, A >::Iterator ( const View< T, false, A > &  view,
const size_t  index = 0 
) [inline]

Construct from View on mutable data.

Parameters:
view View
index Index into the View.

Definition at line 4101 of file marray.hxx.

Here is the call graph for this function:

template<class T, bool isConst, class A>
marray::Iterator< T, isConst, A >::Iterator ( View< T, false, A > &  view,
const size_t  index = 0 
) [inline]

Construct from View on mutable data.

Parameters:
view View
index Index into the View.

Definition at line 4155 of file marray.hxx.

Here is the call graph for this function:

template<class T, bool isConst, class A>
marray::Iterator< T, isConst, A >::Iterator ( const View< T, true, A > &  view,
const size_t  index = 0 
) [inline]

Construct from View on constant data.

Parameters:
view View
index Index into the View.

Definition at line 4048 of file marray.hxx.

Here is the call graph for this function:

template<class T, bool isConst, class A>
marray::Iterator< T, isConst, A >::Iterator ( const Iterator< T, false, A > &  in  )  [inline]

Copy constructor or conversion from an Iterator on mutable data.

Definition at line 4206 of file marray.hxx.


Member Function Documentation

template<class T , bool isConst, class A >
template<class CoordinateIterator >
void marray::Iterator< T, isConst, A >::coordinate ( CoordinateIterator< T, isConst, A >  it  )  const [inline]

Get the corresponding coordinate sequence in the View.

Parameters:
it Iterator into a container starting from which the coordinate sequence is to be written (output).

Definition at line 4613 of file marray.hxx.

template<class T , bool isConst, class A >
bool marray::Iterator< T, isConst, A >::hasMore (  )  const [inline]

Fast alternative to comparing with the end iterator.

Returns:
Boolean indicator.

Definition at line 4587 of file marray.hxx.

template<class T , bool isConst, class A >
size_t marray::Iterator< T, isConst, A >::index (  )  const [inline]

Get the corresponding index in the View.

Returns:
index Index.

Definition at line 4599 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
bool marray::Iterator< T, isConst, A >::operator!= ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4518 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A >::reference marray::Iterator< T, isConst, A >::operator* (  )  const [inline]

De-reference.

Definition at line 4221 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > marray::Iterator< T, isConst, A >::operator+ ( const difference_type x  )  const [inline]

Definition at line 4465 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > marray::Iterator< T, isConst, A >::operator++ ( int   )  [inline]

Postfix increment.

Definition at line 4442 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > & marray::Iterator< T, isConst, A >::operator++ (  )  [inline]

Prefix increment.

Definition at line 4316 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > & marray::Iterator< T, isConst, A >::operator+= ( const difference_type x  )  [inline]

Definition at line 4253 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
Iterator< T, isConst, A >::difference_type marray::Iterator< T, isConst, A >::operator- ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4492 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > marray::Iterator< T, isConst, A >::operator- ( const difference_type x  )  const [inline]

Definition at line 4478 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > marray::Iterator< T, isConst, A >::operator-- ( int   )  [inline]

Postfix decrement.

Definition at line 4454 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > & marray::Iterator< T, isConst, A >::operator-- (  )  [inline]

Prefix decrement.

Definition at line 4380 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A > & marray::Iterator< T, isConst, A >::operator-= ( const difference_type x  )  [inline]

Definition at line 4294 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A >::pointer marray::Iterator< T, isConst, A >::operator-> (  )  const [inline]

Pointer.

Definition at line 4231 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
bool marray::Iterator< T, isConst, A >::operator< ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4533 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
bool marray::Iterator< T, isConst, A >::operator<= ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4559 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
bool marray::Iterator< T, isConst, A >::operator== ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4505 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
bool marray::Iterator< T, isConst, A >::operator> ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4546 of file marray.hxx.

template<class T, bool isConst, class A>
template<bool isConstLocal>
bool marray::Iterator< T, isConst, A >::operator>= ( const Iterator< T, isConstLocal, A > &  it  )  const [inline]

Definition at line 4572 of file marray.hxx.

template<class T , bool isConst, class A >
Iterator< T, isConst, A >::reference marray::Iterator< T, isConst, A >::operator[] ( const size_t  x  )  const [inline]

Element access.

Definition at line 4242 of file marray.hxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:10 2013 for OpenGM by  doxygen 1.6.3