CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
slice.h
Go to the documentation of this file.
1// -*- C++ -*-
12#ifndef __cxz_slice_h__
13#define __cxz_slice_h__
14
15#include "base/base.h"
16#include "array_base.h"
17
18namespace CNORXZ
19{
26 template <typename T>
27 class CSlice : public CArrayBase<T>
28 {
29 public:
32
42 CSlice(const RangePtr& range, const CArrayBase<T>* parent,
43 const YFormat& blockSizes, SizeT off);
44
45 virtual const T* data() const override;
46 virtual const_iterator cbegin() const override;
47 virtual const_iterator cend() const override;
48 virtual bool isView() const override final;
49
51
53
54 const CArrayBase<T>* mCParent = nullptr;
56 SizeT mOff = 0;
58 };
59
68 {
69 public:
72
82 Slice(const RangePtr& range, ArrayBase<T>* parent,
83 const YFormat& blockSizes, SizeT off);
84
85 virtual const T* data() const override;
86 virtual T* data() override;
87 virtual const_iterator cbegin() const override;
88 virtual const_iterator cend() const override;
89 virtual bool isView() const override final;
90
93
94 private:
95 ArrayBase<T>* mParent = nullptr;
97 SizeT mOff = 0;
98
99 };
100}
101
102#endif
Array base class declarations.
basic headers
virtual RangePtr range() const
CArrayBase< T > AB
Definition slice.h:30
virtual const T * data() const override
Definition slice.cc.h:33
AB::const_iterator const_iterator
Definition slice.h:31
virtual bool formatIsTrivial() const override final
Definition slice.cc.h:61
CSlice(const RangePtr &range, const CArrayBase< T > *parent, const YFormat &blockSizes, SizeT off)
Definition slice.cc.h:24
virtual const_iterator cbegin() const override
Definition slice.cc.h:39
virtual const_iterator cend() const override
Definition slice.cc.h:45
SizeT mOff
Definition slice.h:56
DEFAULT_MEMBERS(CSlice)
YFormat mBlockSizes
Definition slice.h:55
virtual bool isView() const override final
Definition slice.cc.h:51
const CArrayBase< T > * mCParent
Definition slice.h:54
AB::const_iterator const_iterator
Definition slice.h:71
CArrayBase< T > AB
Definition slice.h:70
DEFAULT_MEMBERS(Slice)
uint64_t SizeT
Definition types.h:38
Sptr< RangeBase > RangePtr
Definition types.h:157
Sptr< Range > rangeCast(const RangePtr r)