CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
marray.h
Go to the documentation of this file.
1// -*- C++ -*-
12#ifndef __cxz_marray_h__
13#define __cxz_marray_h__
14
15#include "array_base.h"
16
17namespace CNORXZ
18{
19
24 template <typename T>
25 class MArray : public ArrayBase<T>
26 {
27 public:
30
31 using CArrayBase<T>::operator[];
32 using ArrayBase<T>::operator[];
33
35 MArray(const RangePtr& range);
36 MArray(const RangePtr& range, const Vector<T>& vec);
38 MArray& init(const RangePtr& range);
39 MArray& extend(const RangePtr& range);
40
41 virtual const T* data() const override;
42 virtual T* data() override;
43 virtual const_iterator cbegin() const override;
44 virtual const_iterator cend() const override;
45 virtual bool isView() const override;
46
48
49 protected:
50 virtual bool formatIsTrivial() const override final;
51
52 private:
53 Vector<T> mCont;
54 };
55
56}
57
58#endif
Array base class declarations.
virtual RangePtr range() const
CArrayBase< T > AB
Definition marray.h:28
DEFAULT_MEMBERS(MArray)
AB::const_iterator const_iterator
Definition marray.h:29
virtual const_iterator cend() const override
Definition marray.cc.h:83
virtual const_iterator cbegin() const override
Definition marray.cc.h:77
MArray & init(const RangePtr &range)
Definition marray.cc.h:39
SERIALIZATION_FUNCTIONS
Definition marray.h:47
virtual bool formatIsTrivial() const override final
Definition marray.cc.h:99
MArray(const RangePtr &range)
Definition marray.cc.h:24
MArray & extend(const RangePtr &range)
Definition marray.cc.h:47
virtual bool isView() const override
Definition marray.cc.h:89
virtual const T * data() const override
Definition marray.cc.h:65
Sptr< RangeBase > RangePtr
Definition types.h:157
std::vector< T, Allocator< T > > Vector
Definition types.h:310
Sptr< Range > rangeCast(const RangePtr r)