STK++ 0.9.13
STK::Array1D< Type_, Size_ >::InnerOperator Class Reference

#include <STK_Array1D_InnerIterator.h>

Inheritance diagram for STK::Array1D< Type_, Size_ >::InnerOperator:
Inheritance graph

Public Types

typedef InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperatorBase
 
typedef hidden::Traits< Array1D< Type_, Size_ > >::Type Type
 
typedef hidden::Traits< Array1D< Type_, Size_ > >::TypeConst TypeConst
 
typedef hidden::RemoveConst< Type >::Typereference
 
typedef hidden::RemoveConst< Type >::Typepointer
 
- Public Types inherited from STK::InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperator >
enum  
 
typedef hidden::Traits< Array1D< Type_, Size_ > >::Type Type
 
typedef hidden::Traits< Array1D< Type_, Size_ > >::TypeConst TypeConst
 
typedef hidden::RemoveConst< Type >::Type & reference
 
typedef hidden::RemoveConst< Type >::Type * pointer
 

Public Member Functions

 InnerOperator (Array1D< Type_, Size_ > &array)
 default constructor.
 
 InnerOperator (InnerOperator const &it)
 copy constructor.
 
 operator bool () const
 
TypeConst valueImpl () const
 
reference valueRefImpl () const
 
InnerOperator constnextImpl () const
 go to next position
 
InnerOperator constprevImpl () const
 go to previous position
 
- Public Member Functions inherited from STK::InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperator >
int col () const
 get current column of the iterator
 
int row () const
 get current row of the iterator
 
Array1D< Type_, Size_ >::InnerOperator constnext () const
 go to next position
 
Array1D< Type_, Size_ >::InnerOperator constprev () const
 go to previous position
 
Array1D< Type_, Size_ >::InnerOperator constoperator++ () const
 go to next position
 
Array1D< Type_, Size_ >::InnerOperator constoperator++ (int) const
 go to next position
 
Array1D< Type_, Size_ >::InnerOperator constoperator-- () const
 go to previous position
 
Array1D< Type_, Size_ >::InnerOperator constoperator-- (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_)
 
- Public Member Functions inherited from STK::IRecursiveTemplate< Derived >
Derived & asDerived ()
 static cast : return a reference of this with a cast to the derived class.
 
Derived constasDerived () 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 constasPtrDerived () 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.
 

Additional Inherited Members

- Protected Member Functions inherited from STK::InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperator >
 InnerIteratorBase (Array1D< Type_, Size_ > *p_array)
 default constructor.
 
 InnerIteratorBase (InnerIteratorBase const &it)
 copy constructor.
 
 ~InnerIteratorBase ()
 destructor
 
- Protected Member Functions inherited from STK::IRecursiveTemplate< Derived >
 IRecursiveTemplate ()
 constructor.
 
 ~IRecursiveTemplate ()
 destructor.
 
- Protected Attributes inherited from STK::InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperator >
Array1D< Type_, Size_ > *const p_array_
 pointer on instance
 
int row_
 current row position
 
int col_
 current column position
 

Detailed Description

template<class Type_, int Size_>
class STK::Array1D< Type_, Size_ >::InnerOperator

Definition at line 44 of file STK_Array1D_InnerIterator.h.

Member Typedef Documentation

◆ Base

template<class Type_ , int Size_>
typedef InnerIteratorBase< Array1D<Type_, Size_>, Array1D<Type_, Size_>::InnerOperator > STK::Array1D< Type_, Size_ >::InnerOperator::Base

Definition at line 47 of file STK_Array1D_InnerIterator.h.

◆ pointer

template<class Type_ , int Size_>
typedef hidden::RemoveConst<Type>::Type* STK::Array1D< Type_, Size_ >::InnerOperator::pointer

Definition at line 63 of file STK_Array1D_InnerIterator.h.

◆ reference

template<class Type_ , int Size_>
typedef hidden::RemoveConst<Type>::Type& STK::Array1D< Type_, Size_ >::InnerOperator::reference

Definition at line 62 of file STK_Array1D_InnerIterator.h.

◆ Type

template<class Type_ , int Size_>
typedef hidden::Traits<Array1D<Type_,Size_>>::Type STK::Array1D< Type_, Size_ >::InnerOperator::Type

Definition at line 59 of file STK_Array1D_InnerIterator.h.

◆ TypeConst

template<class Type_ , int Size_>
typedef hidden::Traits<Array1D<Type_,Size_>>::TypeConst STK::Array1D< Type_, Size_ >::InnerOperator::TypeConst

Definition at line 60 of file STK_Array1D_InnerIterator.h.

Constructor & Destructor Documentation

◆ InnerOperator() [1/2]

template<class Type_ , int Size_>
STK::Array1D< Type_, Size_ >::InnerOperator::InnerOperator ( Array1D< Type_, Size_ > &  array)
inline

default constructor.

Parameters
arrayinstance to iterate

Definition at line 72 of file STK_Array1D_InnerIterator.h.

72: Base(&array) {}
InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperator > Base

◆ InnerOperator() [2/2]

template<class Type_ , int Size_>
STK::Array1D< Type_, Size_ >::InnerOperator::InnerOperator ( InnerOperator const it)
inline

copy constructor.

Parameters
ititerator to copy

Definition at line 76 of file STK_Array1D_InnerIterator.h.

76: Base(it) {}

Member Function Documentation

◆ nextImpl()

template<class Type_ , int Size_>
InnerOperator const & STK::Array1D< Type_, Size_ >::InnerOperator::nextImpl ( ) const
inline

go to next position

Definition at line 85 of file STK_Array1D_InnerIterator.h.

◆ operator bool()

template<class Type_ , int Size_>
STK::Array1D< Type_, Size_ >::InnerOperator::operator bool ( ) const
inline
Returns
true if iteration are terminated, false otherwise

Definition at line 79 of file STK_Array1D_InnerIterator.h.

79{ return row_ != p_array_->end(); }

◆ prevImpl()

template<class Type_ , int Size_>
InnerOperator const & STK::Array1D< Type_, Size_ >::InnerOperator::prevImpl ( ) const
inline

go to previous position

Definition at line 87 of file STK_Array1D_InnerIterator.h.

87{ row_--; return *this;}

◆ valueImpl()

template<class Type_ , int Size_>
TypeConst STK::Array1D< Type_, Size_ >::InnerOperator::valueImpl ( ) const
inline
Returns
current value of the iterator

Definition at line 81 of file STK_Array1D_InnerIterator.h.

81{ return p_array_->allocator().elt(row_);}

◆ valueRefImpl()

template<class Type_ , int Size_>
reference STK::Array1D< Type_, Size_ >::InnerOperator::valueRefImpl ( ) const
inline
Returns
current value of the iterator

Definition at line 83 of file STK_Array1D_InnerIterator.h.

83{ return p_array_->allocator().elt(row_);}

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