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

#include <array_base.h>

Inheritance diagram for CNORXZ::CArrayBase< T >:
CNORXZ::ArrayBase< ContentPtr > CNORXZ::ArrayBase< SizeT > CNORXZ::ArrayBase< hid_t > CNORXZ::ArrayBase< T > CNORXZ::CSlice< T > CNORXZ::MArray< ContentPtr > CNORXZ::MArray< SizeT > CNORXZ::MArray< hid_t > CNORXZ::MArray< T > CNORXZ::Slice< T >

Public Types

typedef AIndex< Tconst_iterator
 

Public Member Functions

 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 const Tdata () const =0
 
virtual SizeT size () const
 
virtual RangePtr range () const
 
virtual const_iterator begin () const
 
virtual const_iterator end () const
 
virtual const_iterator cbegin () const =0
 
virtual const_iterator cend () const =0
 
virtual bool isView () const =0
 

Protected Member Functions

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
 
virtual bool formatIsTrivial () const =0
 

Protected Attributes

RangePtr mRange
 

Detailed Description

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

Abstract container base class only read access to the data

Template Parameters
Tdata type

Definition at line 33 of file array_base.h.

Member Typedef Documentation

◆ const_iterator

template<typename T >
typedef AIndex<T> CNORXZ::CArrayBase< T >::const_iterator

Definition at line 36 of file array_base.h.

Constructor & Destructor Documentation

◆ CArrayBase()

template<typename T >
CNORXZ::CArrayBase< T >::CArrayBase ( const RangePtr & range)

construct container on a range

Parameters
range

Definition at line 25 of file array_base.cc.h.

◆ ~CArrayBase()

template<typename T >
virtual CNORXZ::CArrayBase< T >::~CArrayBase ( )
virtualdefault

default destructor

Member Function Documentation

◆ at() [1/3]

template<typename T >
const T & CNORXZ::CArrayBase< T >::at ( const DPack & pack) const

const data element access performs compatibility checks

Parameters
iindex pack

Definition at line 79 of file array_base.cc.h.

◆ at() [2/3]

template<typename T >
template<typename I , typename M >
const T & CNORXZ::CArrayBase< T >::at ( const IndexInterface< I, M > & i) const

const data element access performs compatibility checks

Template Parameters
Iindex type
Mmeta data type
Parameters
iindex

Definition at line 44 of file array_base.cc.h.

◆ at() [3/3]

template<typename T >
template<class... Indices>
const T & CNORXZ::CArrayBase< T >::at ( const SPack< Indices... > & pack) const

const data element access performs compatibility checks

Template Parameters
Iindex type
Mmeta data type
Parameters
istatic index pack

Definition at line 65 of file array_base.cc.h.

◆ begin()

template<typename T >
CArrayBase< T >::const_iterator CNORXZ::CArrayBase< T >::begin ( ) const
virtual

get index pointing to first position

Reimplemented in CNORXZ::ArrayBase< T >, CNORXZ::ArrayBase< ContentPtr >, CNORXZ::ArrayBase< hid_t >, and CNORXZ::ArrayBase< SizeT >.

Definition at line 108 of file array_base.cc.h.

◆ cbegin()

template<typename T >
virtual const_iterator CNORXZ::CArrayBase< T >::cbegin ( ) const
pure virtual

◆ cend()

template<typename T >
virtual const_iterator CNORXZ::CArrayBase< T >::cend ( ) const
pure virtual

◆ checkFormatCompatibility()

template<typename T >
template<class Acc >
void CNORXZ::CArrayBase< T >::checkFormatCompatibility ( const Acc & acc) const
protected

Perform compatibility checks

Template Parameters
Accindex type or index pack type
Parameters
accindex or index pack.

Definition at line 190 of file array_base.cc.h.

◆ data()

template<typename T >
virtual const T * CNORXZ::CArrayBase< T >::data ( ) const
pure virtual

◆ DEFAULT_MEMBERS()

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

const iterator type default constructors and assignments

◆ end()

template<typename T >
CArrayBase< T >::const_iterator CNORXZ::CArrayBase< T >::end ( ) const
virtual

get index pointing to position after last position

Reimplemented in CNORXZ::ArrayBase< T >, CNORXZ::ArrayBase< ContentPtr >, CNORXZ::ArrayBase< hid_t >, and CNORXZ::ArrayBase< SizeT >.

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

◆ formatIsTrivial()

template<typename T >
virtual bool CNORXZ::CArrayBase< T >::formatIsTrivial ( ) const
protectedpure virtual

check if format is trivial

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

Implemented in CNORXZ::MArray< T >, CNORXZ::MArray< ContentPtr >, CNORXZ::MArray< hid_t >, CNORXZ::MArray< SizeT >, CNORXZ::CSlice< T >, and CNORXZ::Slice< T >.

◆ isView()

template<typename T >
virtual bool CNORXZ::CArrayBase< T >::isView ( ) const
pure virtual

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

Implemented in CNORXZ::MArray< T >, CNORXZ::MArray< ContentPtr >, CNORXZ::MArray< hid_t >, CNORXZ::MArray< SizeT >, CNORXZ::CSlice< T >, and CNORXZ::Slice< T >.

◆ itLex()

template<typename T >
template<class Acc >
CArrayBase< T >::const_iterator CNORXZ::CArrayBase< T >::itLex ( const Acc & acc) const
protected

Get valid data index. Create well-formated index from index pack (unformatted) or index using trivial format.

Template Parameters
Accindex type or index pack type
Parameters
accindex or index pack

Definition at line 174 of file array_base.cc.h.

◆ itLexSave()

template<typename T >
template<class Acc >
CArrayBase< T >::const_iterator CNORXZ::CArrayBase< T >::itLexSave ( const Acc & acc) const
protected

Get valid data index. Create well-formated index from index pack (unformatted) or index using trivial format. Perform compatibility checks.

Template Parameters
Accindex type or index pack type
Parameters
accindex or index pack

Definition at line 181 of file array_base.cc.h.

◆ operator()() [1/3]

template<typename T >
decltype(auto) CNORXZ::CArrayBase< T >::operator() ( const DPack & pack) const
inline

create operation on this container

Parameters
packpack of operation index

Definition at line 163 of file array_base.cc.h.

◆ operator()() [2/3]

template<typename T >
template<class... Indices>
decltype(auto) CNORXZ::CArrayBase< T >::operator() ( const SPack< Indices... > & pack) const
inline

create operation on this container

Template Parameters
Indicestypes of operation indices
Parameters
packpack of operation index

Definition at line 157 of file array_base.cc.h.

◆ operator()() [3/3]

template<typename T >
template<class Index >
COpRoot< T, Index > CNORXZ::CArrayBase< T >::operator() ( const Sptr< Index > & i) const

create operation on this container

Template Parameters
Indextype of operation index
Parameters
ioperation index

Definition at line 121 of file array_base.cc.h.

◆ operator[]() [1/3]

template<typename T >
const T & CNORXZ::CArrayBase< T >::operator[] ( const DPack & pack) const

const data element access

Parameters
packindex pack

Definition at line 72 of file array_base.cc.h.

◆ operator[]() [2/3]

template<typename T >
template<typename I , typename M >
const T & CNORXZ::CArrayBase< T >::operator[] ( const IndexInterface< I, M > & i) const

const data element access

Template Parameters
Iindex type
Mmeta data type
Parameters
iindex

Definition at line 31 of file array_base.cc.h.

◆ operator[]() [3/3]

template<typename T >
template<class... Indices>
const T & CNORXZ::CArrayBase< T >::operator[] ( const SPack< Indices... > & pack) const

const data element access

Template Parameters
Iindex type
Mmeta data type
Parameters
packstatic index pack

Definition at line 52 of file array_base.cc.h.

◆ range()

template<typename T >
RangePtr CNORXZ::CArrayBase< T >::range ( ) const
virtual

get container range

Definition at line 102 of file array_base.cc.h.

◆ size()

template<typename T >
SizeT CNORXZ::CArrayBase< T >::size ( ) const
virtual

get number of elements in the container

Definition at line 96 of file array_base.cc.h.

◆ sl()

template<typename T >
template<typename I , typename M >
Sptr< CArrayBase< T > > CNORXZ::CArrayBase< T >::sl ( const IndexInterface< I, M > & begin,
const IndexInterface< I, M > & end ) const

create hypercubic slice from this container

Template Parameters
Itype of index used to indicate slice edges
Mindex meta type
Parameters
beginbegin edge
endend edge

Definition at line 87 of file array_base.cc.h.

Member Data Documentation

◆ mRange

template<typename T >
RangePtr CNORXZ::CArrayBase< T >::mRange
protected

the container range

Definition at line 147 of file array_base.h.


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