CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
CNORXZ::Slice< T > Class Template Reference

#include <slice.h>

Inheritance diagram for CNORXZ::Slice< T >:
CNORXZ::ArrayBase< T > CNORXZ::CArrayBase< T >

Public Types

typedef CArrayBase< TAB
 
typedef AB::const_iterator const_iterator
 
- Public Types inherited from CNORXZ::ArrayBase< T >
typedef CArrayBase< TCAB
 
typedef CAB::const_iterator const_iterator
 
typedef BIndex< Titerator
 
- Public Types inherited from CNORXZ::CArrayBase< T >
typedef AIndex< Tconst_iterator
 

Public Member Functions

 DEFAULT_MEMBERS (Slice)
 
 Slice (const RangePtr &range, ArrayBase< T > *parent, const YFormat &blockSizes, SizeT off)
 
virtual const Tdata () const override
 
virtual Tdata () override
 
virtual const_iterator cbegin () const override
 
virtual const_iterator cend () const override
 
virtual bool isView () const override final
 
- Public Member Functions inherited from CNORXZ::ArrayBase< T >
 DEFAULT_MEMBERS (ArrayBase)
 
 ArrayBase (const RangePtr &range)
 
template<typename I , typename M >
Toperator[] (const IndexInterface< I, M > &i)
 
template<typename I , typename M >
Tat (const IndexInterface< I, M > &i)
 
template<class... Indices>
Toperator[] (const SPack< Indices... > &pack)
 
template<class... Indices>
Tat (const SPack< Indices... > &pack)
 
Toperator[] (const DPack &pack)
 
Tat (const DPack &pack)
 
template<class Index >
OpRoot< T, Index > operator() (const Sptr< Index > &i)
 
template<class... Indices>
decltype(autooperator() (const SPack< Indices... > &pack)
 
decltype(autooperator() (const DPack &pack)
 
template<typename I , typename M >
Sptr< ArrayBase< T > > sl (const IndexInterface< I, M > &begin, const IndexInterface< I, M > &end)
 
virtual iterator begin ()
 
virtual iterator end ()
 
template<typename I , typename M >
const Tat (const IndexInterface< I, M > &i) const
 
template<class... Indices>
const Tat (const SPack< Indices... > &pack) const
 
const Tat (const DPack &pack) const
 
virtual const_iterator begin () const
 
virtual const_iterator end () const
 
template<typename I , typename M >
Sptr< CArrayBase< T > > sl (const IndexInterface< I, M > &begin, const IndexInterface< I, M > &end) const
 
- Public Member Functions inherited from CNORXZ::CArrayBase< T >
 DEFAULT_MEMBERS (CArrayBase)
 
 CArrayBase (const RangePtr &range)
 
virtual ~CArrayBase ()=default
 
template<typename I , typename M >
const Toperator[] (const IndexInterface< I, M > &i) const
 
template<typename I , typename M >
const Tat (const IndexInterface< I, M > &i) const
 
template<class... Indices>
const Toperator[] (const SPack< Indices... > &pack) const
 
template<class... Indices>
const Tat (const SPack< Indices... > &pack) const
 
const Toperator[] (const DPack &pack) const
 
const Tat (const DPack &pack) const
 
template<typename I , typename M >
Sptr< CArrayBase< T > > sl (const IndexInterface< I, M > &begin, const IndexInterface< I, M > &end) const
 
template<class Index >
COpRoot< T, Index > operator() (const Sptr< Index > &i) const
 
template<class... Indices>
decltype(autooperator() (const SPack< Indices... > &pack) const
 
decltype(autooperator() (const DPack &pack) const
 
virtual SizeT size () const
 
virtual RangePtr range () const
 

Protected Member Functions

virtual bool formatIsTrivial () const override final
 
- Protected Member Functions inherited from CNORXZ::ArrayBase< T >
template<class Acc >
iterator itLex (const Acc &acc)
 
template<class Acc >
iterator itLexSave (const Acc &acc)
 
- Protected Member Functions inherited from CNORXZ::CArrayBase< T >
template<class Acc >
const_iterator itLex (const Acc &acc) const
 
template<class Acc >
const_iterator itLexSave (const Acc &acc) const
 
template<class Acc >
void checkFormatCompatibility (const Acc &acc) const
 

Additional Inherited Members

- Protected Attributes inherited from CNORXZ::CArrayBase< T >
RangePtr mRange
 

Detailed Description

template<typename T>
class CNORXZ::Slice< T >

possibly partial view on the data of another container

Template Parameters
Tdata type

Definition at line 67 of file slice.h.

Member Typedef Documentation

◆ AB

Definition at line 70 of file slice.h.

◆ const_iterator

template<typename T >
typedef AB::const_iterator CNORXZ::Slice< T >::const_iterator

Definition at line 71 of file slice.h.

Constructor & Destructor Documentation

◆ Slice()

template<typename T >
CNORXZ::Slice< T >::Slice ( const RangePtr & range,
ArrayBase< T > * parent,
const YFormat & blockSizes,
SizeT off )

create slice from an array

Parameters
rangethe slice's container range
parentthe original container
blockSizesthe format of the slice
offthe initial pointer position w.r.t. the original initial position

Definition at line 71 of file slice.cc.h.

Member Function Documentation

◆ cbegin()

template<typename T >
Slice< T >::const_iterator CNORXZ::Slice< T >::cbegin ( ) const
overridevirtual

get index pointing to first position

Reimplemented from CNORXZ::ArrayBase< T >.

Definition at line 92 of file slice.cc.h.

◆ cend()

template<typename T >
Slice< T >::const_iterator CNORXZ::Slice< T >::cend ( ) const
overridevirtual

get index pointing to position after last position

Reimplemented from CNORXZ::ArrayBase< T >.

Definition at line 98 of file slice.cc.h.

◆ data() [1/2]

template<typename T >
const T * CNORXZ::Slice< T >::data ( ) const
overridevirtual

get pointer to container data

Reimplemented from CNORXZ::ArrayBase< T >.

Definition at line 86 of file slice.cc.h.

◆ data() [2/2]

template<typename T >
T * CNORXZ::Slice< T >::data ( )
overridevirtual

get pointer to container data read/write access

Implements CNORXZ::ArrayBase< T >.

Definition at line 80 of file slice.cc.h.

◆ DEFAULT_MEMBERS()

template<typename T >
CNORXZ::Slice< T >::DEFAULT_MEMBERS ( Slice< T > )

default constructors and assignments

◆ formatIsTrivial()

template<typename T >
bool CNORXZ::Slice< T >::formatIsTrivial ( ) const
finaloverrideprotectedvirtual

check if format is trivial

Returns
true if container is data owning array, else return result of the corresponding container index

Implements CNORXZ::CArrayBase< T >.

Definition at line 114 of file slice.cc.h.

◆ isView()

template<typename T >
bool CNORXZ::Slice< T >::isView ( ) const
finaloverridevirtual

check if container views the data, i.e. it does not own it

Implements CNORXZ::CArrayBase< T >.

Definition at line 104 of file slice.cc.h.


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