STK++ 0.9.13
|
InnerIteratorBase is a base class for all iterators on allocators. More...
#include <STK_InnerIteratorBase.h>
Public Types | |
enum | { structure_ = hidden::Traits< Array >::structure_ , orient_ = hidden::Traits< Array >::orient_ , sizeCols_ = hidden::Traits< Array >::sizeCols_ , sizeRows_ = hidden::Traits< Array >::sizeRows_ , size_ = hidden::Traits< Array >::size_ , storage_ = hidden::Traits< Array >::storage_ } |
typedef hidden::Traits< Array >::Type | Type |
typedef hidden::Traits< Array >::TypeConst | TypeConst |
typedef hidden::RemoveConst< Type >::Type & | reference |
typedef hidden::RemoveConst< Type >::Type * | pointer |
Public Member Functions | |
int | col () const |
get current column of the iterator | |
int | row () const |
get current row of the iterator | |
Derived const & | next () const |
go to next position | |
Derived const & | prev () const |
go to previous position | |
Derived const & | operator++ () const |
go to next position | |
Derived const & | operator++ (int) const |
go to next position | |
Derived const & | operator-- () const |
go to previous position | |
Derived const & | operator-- (int) const |
go to previous position | |
TypeConst | value () const |
get current value of the iterator | |
reference | valueRef () const |
get current value of the iterator | |
reference | operator* () const |
get a reference on the current element (the one at position pos_) | |
pointer | operator-> () const |
get address of the current element (the one at position pos_) | |
![]() | |
Derived & | asDerived () |
static cast : return a reference of this with a cast to the derived class. | |
Derived const & | asDerived () const |
static cast : return a const reference of this with a cast to the derived class. | |
Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
Derived * | clone () const |
create a leaf using the copy constructor of the Derived class. | |
Derived * | clone (bool isRef) const |
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Protected Member Functions | |
InnerIteratorBase (Array *p_array) | |
default constructor. | |
InnerIteratorBase (InnerIteratorBase const &it) | |
copy constructor. | |
~InnerIteratorBase () | |
destructor | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
Protected Attributes | |
Array *const | p_array_ |
pointer on instance | |
int | row_ |
current row position | |
int | col_ |
current column position | |
InnerIteratorBase is a base class for all iterators on allocators.
Derived class can iterate through allocators what ever how storage is implemented.
Derived classes have to implement the following pseudo virtual methods
Derived | array to iterate |
Array | array to iterate |
Definition at line 61 of file STK_InnerIteratorBase.h.
typedef hidden::RemoveConst<Type>::Type* STK::InnerIteratorBase< Array, Derived >::pointer |
Definition at line 98 of file STK_InnerIteratorBase.h.
typedef hidden::RemoveConst<Type>::Type& STK::InnerIteratorBase< Array, Derived >::reference |
Definition at line 97 of file STK_InnerIteratorBase.h.
typedef hidden::Traits<Array>::Type STK::InnerIteratorBase< Array, Derived >::Type |
Definition at line 94 of file STK_InnerIteratorBase.h.
typedef hidden::Traits<Array>::TypeConst STK::InnerIteratorBase< Array, Derived >::TypeConst |
Definition at line 95 of file STK_InnerIteratorBase.h.
Enumerator | |
---|---|
structure_ | |
orient_ | |
sizeCols_ | |
sizeRows_ | |
size_ | |
storage_ |
Definition at line 84 of file STK_InnerIteratorBase.h.
|
inlineprotected |
default constructor.
p_array | pointer on the instance to iterate |
Definition at line 67 of file STK_InnerIteratorBase.h.
|
inlineprotected |
copy constructor.
it | iterator to copy |
Definition at line 75 of file STK_InnerIteratorBase.h.
|
inlineprotected |
|
inline |
get current column of the iterator
Definition at line 101 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::col_.
|
inline |
go to next position
Definition at line 106 of file STK_InnerIteratorBase.h.
References STK::IRecursiveTemplate< Derived >::asDerived().
Referenced by STK::InnerIteratorBase< Array, Derived >::operator++(), and STK::InnerIteratorBase< Array, Derived >::operator++().
|
inline |
get a reference on the current element (the one at position pos_)
Definition at line 123 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::value().
|
inline |
go to next position
Definition at line 110 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::next().
|
inline |
go to next position
Definition at line 112 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::next().
|
inline |
go to previous position
Definition at line 114 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::prev().
|
inline |
go to previous position
Definition at line 116 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::prev().
|
inline |
get address of the current element (the one at position pos_)
Definition at line 125 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::value().
|
inline |
go to previous position
Definition at line 108 of file STK_InnerIteratorBase.h.
References STK::IRecursiveTemplate< Derived >::asDerived().
Referenced by STK::InnerIteratorBase< Array, Derived >::operator--(), and STK::InnerIteratorBase< Array, Derived >::operator--().
|
inline |
get current row of the iterator
Definition at line 103 of file STK_InnerIteratorBase.h.
References STK::InnerIteratorBase< Array, Derived >::row_.
|
inline |
get current value of the iterator
Definition at line 119 of file STK_InnerIteratorBase.h.
References STK::IRecursiveTemplate< Derived >::asDerived().
Referenced by STK::InnerIteratorBase< Array, Derived >::operator*(), and STK::InnerIteratorBase< Array, Derived >::operator->().
|
inline |
get current value of the iterator
Definition at line 121 of file STK_InnerIteratorBase.h.
References STK::IRecursiveTemplate< Derived >::asDerived().
|
mutableprotected |
current column position
Definition at line 133 of file STK_InnerIteratorBase.h.
Referenced by STK::InnerIteratorBase< Array, Derived >::col().
|
protected |
pointer on instance
Definition at line 129 of file STK_InnerIteratorBase.h.
|
mutableprotected |
current row position
Definition at line 131 of file STK_InnerIteratorBase.h.
Referenced by STK::InnerIteratorBase< Array, Derived >::row().