Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr > Class Template Reference

Base class for STL like iterator for matrices. More...

#include <matrixIterator.hh>

Inheritance diagram for concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >:
Inheritance graph
[legend]
Collaboration diagram for concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >:
Collaboration graph
[legend]

List of all members.

Classes

struct  ReturnType
 Return type for derefencation is reference for non-constant iterator. More...
struct  ReturnType< const _Tp_ & >
 Return type for derefencation is constant copy for constant iterator. More...

Public Types

typedef _Matrix_iterator_base _Self
typedef _Matrix_iterator_base
< _Tp, const _Tp &, const _Tp * > 
const_iterator
typedef ptrdiff_t difference_type
typedef _Matrix_iterator_base
< _Tp, _Tp &, _Tp * > 
iterator
typedef _Ptr pointer
typedef _Ref reference
typedef ReturnType< _Ref >::type return_type
typedef size_t size_type
typedef _Tp value_type

Public Member Functions

 _Matrix_iterator_base (const uint nofRows, const uint nofCols, const uint r, const uint c)
 Constructor.
 _Matrix_iterator_base ()
 Constructor. Iterator stands at the end of any matrix.
template<class _RefR , class _PtrR >
 _Matrix_iterator_base (const _Matrix_iterator_base< _Tp, _RefR, _PtrR > &__x)
 Copy constructor.
uint col () const
 Column.
bool last () const
 Returns true, if iterator is behind the last entry.
const uint nofCols () const
 Number of columns.
const uint nofRows () const
 Number of rows.
_Selfoperator= (const iterator &__x)
 Assignment.
uint row () const
 Row.

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.

Protected Attributes

uint col_
bool last_
 Iterator is behind the last entrance.
const uint nofCols_
const uint nofRows_
 Number of rows and columns.
uint row_
 Current row and column.

Detailed Description

template<class _Tp, class _Ref, class _Ptr>
class concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >

Base class for STL like iterator for matrices.

Author:
Kersten Schmidt, 2005

Definition at line 26 of file matrixIterator.hh.


Member Typedef Documentation

template<class _Tp, class _Ref, class _Ptr>
typedef _Matrix_iterator_base concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::_Self
template<class _Tp, class _Ref, class _Ptr>
typedef _Matrix_iterator_base<_Tp, const _Tp&, const _Tp*> concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::const_iterator
template<class _Tp, class _Ref, class _Ptr>
typedef ptrdiff_t concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::difference_type
template<class _Tp, class _Ref, class _Ptr>
typedef _Matrix_iterator_base<_Tp, _Tp&, _Tp*> concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::iterator
template<class _Tp, class _Ref, class _Ptr>
typedef _Ptr concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::pointer
template<class _Tp, class _Ref, class _Ptr>
typedef _Ref concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::reference
template<class _Tp, class _Ref, class _Ptr>
typedef ReturnType<_Ref>::type concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::return_type
template<class _Tp, class _Ref, class _Ptr>
typedef size_t concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::size_type
template<class _Tp, class _Ref, class _Ptr>
typedef _Tp concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::value_type

Constructor & Destructor Documentation

template<class _Tp, class _Ref, class _Ptr>
concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::_Matrix_iterator_base ( const uint  nofRows,
const uint  nofCols,
const uint  r,
const uint  c 
)

Constructor.

Parameters:
nofRowsnumber of rows of the matrix
nofColsnumber of columns of the matrix
rrow
ccolumn
template<class _Tp, class _Ref, class _Ptr>
concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::_Matrix_iterator_base ( )

Constructor. Iterator stands at the end of any matrix.

template<class _Tp, class _Ref, class _Ptr>
template<class _RefR , class _PtrR >
concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::_Matrix_iterator_base ( const _Matrix_iterator_base< _Tp, _RefR, _PtrR > &  __x) [inline]

Copy constructor.

Can copy an iterator to an constant one as well.

Definition at line 62 of file matrixIterator.hh.


Member Function Documentation

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::col ( ) const [inline]

Column.

Definition at line 73 of file matrixIterator.hh.

template<class _Tp , class _Ref , class _Ptr >
std::ostream & concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::info ( std::ostream &  os) const [protected, virtual]
template<class _Tp, class _Ref, class _Ptr>
bool concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::last ( ) const [inline]

Returns true, if iterator is behind the last entry.

Definition at line 75 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofCols ( ) const [inline]

Number of columns.

Definition at line 69 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofRows ( ) const [inline]

Number of rows.

Definition at line 67 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
_Self& concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::operator= ( const iterator __x) [inline]

Assignment.

Reimplemented in concepts::_Matrix_iterator< _Tp, _Ref, _Ptr >.

Definition at line 78 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::row ( ) const [inline]

Row.

Definition at line 71 of file matrixIterator.hh.


Member Data Documentation

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::col_ [protected]

Definition at line 91 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
bool concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::last_ [protected]

Iterator is behind the last entrance.

Definition at line 93 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofCols_ [protected]

Definition at line 89 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofRows_ [protected]

Number of rows and columns.

Definition at line 89 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::row_ [protected]

Current row and column.

Definition at line 91 of file matrixIterator.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)