2022-09-09 19:41:43 +02:00
|
|
|
|
2022-12-06 14:48:44 +01:00
|
|
|
#ifndef __cxz_marray_h__
|
|
|
|
#define __cxz_marray_h__
|
2022-09-09 19:41:43 +02:00
|
|
|
|
2022-12-06 14:48:44 +01:00
|
|
|
#include "array_base.h"
|
2022-09-09 19:41:43 +02:00
|
|
|
|
|
|
|
namespace CNORXZ
|
|
|
|
{
|
|
|
|
|
|
|
|
template <typename T>
|
2022-12-06 14:48:44 +01:00
|
|
|
class MArray : public ArrayBase<T>
|
2022-09-09 19:41:43 +02:00
|
|
|
{
|
|
|
|
public:
|
2022-12-06 14:48:44 +01:00
|
|
|
typedef CArrayBase<T> AB;
|
2022-09-09 19:41:43 +02:00
|
|
|
typedef typename AB::const_iterator const_iterator;
|
|
|
|
|
2022-12-06 14:48:44 +01:00
|
|
|
using CArrayBase<T>::operator[];
|
|
|
|
using ArrayBase<T>::operator[];
|
2022-09-09 19:41:43 +02:00
|
|
|
|
2022-12-06 14:48:44 +01:00
|
|
|
DEFAULT_MEMBERS(MArray);
|
|
|
|
MArray(const RangePtr& range);
|
|
|
|
MArray(const RangePtr& range, const Vector<T>& vec);
|
|
|
|
MArray(const RangePtr& range, Vector<T>&& vec);
|
2022-09-09 19:41:43 +02:00
|
|
|
|
2022-11-22 19:11:41 +01:00
|
|
|
virtual SizeT pmax() const override;
|
2022-09-09 19:41:43 +02:00
|
|
|
virtual const T* data() const override;
|
|
|
|
virtual T* data() override;
|
|
|
|
virtual const_iterator cbegin() const override;
|
|
|
|
virtual const_iterator cend() const override;
|
|
|
|
virtual bool isView() const override;
|
|
|
|
|
2022-11-22 19:11:41 +01:00
|
|
|
private:
|
|
|
|
Vector<T> mCont;
|
2022-09-09 19:41:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|