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::CSlice< T > Class Template Reference

#include <slice.h>

Inheritance diagram for CNORXZ::CSlice< T >:
CNORXZ::CArrayBase< T >

Public Types

typedef CArrayBase< TAB
 
typedef AB::const_iterator const_iterator
 
- Public Types inherited from CNORXZ::CArrayBase< T >
typedef AIndex< Tconst_iterator
 

Public Member Functions

 DEFAULT_MEMBERS (CSlice)
 
 CSlice (const RangePtr &range, const CArrayBase< T > *parent, const YFormat &blockSizes, SizeT off)
 
virtual const Tdata () const 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::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
 
virtual const_iterator begin () const
 
virtual const_iterator end () const
 

Protected Member Functions

virtual bool formatIsTrivial () const override final
 
- 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
 

Protected Attributes

const CArrayBase< T > * mCParent = nullptr
 
YFormat mBlockSizes
 
SizeT mOff = 0
 
- Protected Attributes inherited from CNORXZ::CArrayBase< T >
RangePtr mRange
 

Detailed Description

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

constant and possibly partial view on the data of another container

Template Parameters
Tdata type

Definition at line 27 of file slice.h.

Member Typedef Documentation

◆ AB

Definition at line 30 of file slice.h.

◆ const_iterator

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

Definition at line 31 of file slice.h.

Constructor & Destructor Documentation

◆ CSlice()

template<typename T >
CNORXZ::CSlice< T >::CSlice ( const RangePtr & range,
const CArrayBase< 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 24 of file slice.cc.h.

Member Function Documentation

◆ cbegin()

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

get index pointing to first position

Implements CNORXZ::CArrayBase< T >.

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

◆ cend()

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

get index pointing to position after last position

Implements CNORXZ::CArrayBase< T >.

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

◆ data()

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

get pointer to container data

Implements CNORXZ::CArrayBase< T >.

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

◆ DEFAULT_MEMBERS()

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

default constructors and assignments

◆ formatIsTrivial()

template<typename T >
bool CNORXZ::CSlice< 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 61 of file slice.cc.h.

◆ isView()

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

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

Implements CNORXZ::CArrayBase< T >.

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

Member Data Documentation

◆ mBlockSizes

template<typename T >
YFormat CNORXZ::CSlice< T >::mBlockSizes
protected

the format

Definition at line 55 of file slice.h.

◆ mCParent

template<typename T >
const CArrayBase<T>* CNORXZ::CSlice< T >::mCParent = nullptr
protected

pointer to the original container

Definition at line 54 of file slice.h.

◆ mOff

template<typename T >
SizeT CNORXZ::CSlice< T >::mOff = 0
protected

Definition at line 56 of file slice.h.


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