STK++ 0.9.13
|
Base class for TRange class. More...
#include <STK_Range.h>
Public Member Functions | |
~RangeBase () | |
destructor. | |
int | begin () const |
get the first index of the TRange. | |
template<int OtherSize_> | |
bool | isIn (TRange< OtherSize_ > const &I) const |
check if this TRange in include in an other TRange | |
template<int OtherSize_> | |
bool | isContaining (TRange< OtherSize_ > const &I) const |
check if the TRange I is include in the this TRange | |
bool | isContaining (int i) const |
Return true if i is in this TRange. | |
Derived & | operator+= (int i) |
shift range a:b becomes (a+i):(b+i) | |
Derived & | operator-= (int i) |
shift range a:b becomes (a+i):(b+i) | |
template<int OtherSize_> | |
bool | operator== (TRange< OtherSize_ > const &I) const |
compare this range with range I | |
template<int OtherSize_> | |
bool | operator!= (TRange< OtherSize_ > const &I) const |
compare this range with range I | |
![]() | |
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 | |
RangeBase () | |
Default constructor. | |
RangeBase (int begin) | |
constructor. | |
RangeBase (RangeBase const &I) | |
Copy constructor. | |
template<class OtherDerived > | |
RangeBase (RangeBase< OtherDerived > const &I) | |
Copy constructor. | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
Protected Attributes | |
int | begin_ |
First index. | |
Definition at line 68 of file STK_Range.h.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Copy constructor.
I | range to copy |
Definition at line 80 of file STK_Range.h.
|
inlineprotected |
Copy constructor.
I | range to copy |
Definition at line 85 of file STK_Range.h.
|
inline |
|
inline |
get the first index of the TRange.
Definition at line 93 of file STK_Range.h.
References STK::RangeBase< Derived >::begin_.
Referenced by STK::MemSAllocator1D< Type_, NzMax_ >::begin(), STK::IContainer2D< SizeRows_, SizeCols_ >::beginCols(), STK::ITContainerBase< Derived >::beginCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::beginRows(), STK::ITContainerBase< Derived >::beginRows(), STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray(), STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray(), STK::CArrayPoint< Type_, SizeCols_, Orient_ >::CArrayPoint(), STK::CArrayPoint< Type_, SizeCols_, Orient_ >::CArrayPoint(), STK::CArraySquare< Type_, Size_, Orient_ >::CArraySquare(), STK::CArraySquare< Type_, Size_, Orient_ >::CArraySquare(), STK::CArrayVector< Type_, SizeRows_, Orient_ >::CArrayVector(), STK::CArrayVector< Type_, SizeRows_, Orient_ >::CArrayVector(), STK::hidden::MemHandler< Type_, UnknownSize >::free(), STK::RangeBase< Derived >::isIn(), STK::hidden::MemHandler< Type_, UnknownSize >::malloc(), STK::MemSAllocator1D< Type_, NzMax_ >::memmove(), STK::Arrays::SumOp< Lhs, Rhs >::operator()(), STK::Arrays::DifferenceOp< Lhs, Rhs >::operator()(), STK::Arrays::Product< Lhs, Rhs >::operator()(), STK::Arrays::DivOp< Lhs, Rhs >::operator()(), STK::MemAllocator< Type_, Size_ >::realloc(), STK::hidden::MemHandler< Type_, UnknownSize >::realloc(), and STK::hidden::ProductDispatcher< Lhs, Rhs, Result, lhsStructure_, RhsStructure_ >::run().
|
inline |
Return true if i is in this TRange.
i | the integer to compare |
true
if i is in this, false
otherwise Definition at line 113 of file STK_Range.h.
References STK::IRecursiveTemplate< Derived >::asDerived(), and STK::RangeBase< Derived >::begin_.
|
inline |
check if the TRange I is include in the this TRange
I | the range to compare |
true
if this contain I, false
otherwise Definition at line 107 of file STK_Range.h.
References STK::RangeBase< Derived >::begin_.
|
inline |
check if this TRange in include in an other TRange
I | the index to compare |
true
if this is include in I
, false
otherwise Definition at line 100 of file STK_Range.h.
References STK::IRecursiveTemplate< Derived >::asDerived(), and STK::RangeBase< Derived >::begin().
|
inline |
compare this range with range I
I | the Index to compare |
true
if the range are different, false
otherwise Definition at line 138 of file STK_Range.h.
References STK::RangeBase< Derived >::begin_.
|
inline |
shift range a:b becomes (a+i):(b+i)
i | shift to apply |
true
if the range are equals, false
otherwise Definition at line 119 of file STK_Range.h.
References STK::IRecursiveTemplate< Derived >::asDerived().
|
inline |
shift range a:b becomes (a+i):(b+i)
i | shift to apply |
true
if the range are equals, false
otherwise Definition at line 124 of file STK_Range.h.
References STK::IRecursiveTemplate< Derived >::asDerived().
|
inline |
compare this range with range I
I | the Index to compare |
true
if the range are equals, false
otherwise Definition at line 131 of file STK_Range.h.
References STK::RangeBase< Derived >::begin_.
|
protected |
First index.
Definition at line 142 of file STK_Range.h.
Referenced by STK::RangeBase< Derived >::begin(), STK::RangeBase< Derived >::isContaining(), STK::RangeBase< Derived >::isContaining(), STK::RangeBase< Derived >::operator!=(), and STK::RangeBase< Derived >::operator==().