CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
vpos_type.h
Go to the documentation of this file.
1// -*- C++ -*-
12#ifndef __cxz_vpos_type_h__
13#define __cxz_vpos_type_h__
14
15#include "base/base.h"
16
17namespace CNORXZ
18{
20 {
21 public:
23 virtual ~VPosBase() = default;
24
25 virtual Uptr<VPosBase> copy() const = 0;
26 virtual SizeT vsize() const = 0;
27 virtual SizeT vval() const = 0;
28 virtual const VPosBase* vget() const = 0; // strip away all MPos<...>
29 virtual const VPosBase* vnext() const = 0;
30 virtual Uptr<VPosBase> vplus(const VPosBase* a) const = 0;
31 virtual Uptr<VPosBase> vtimes(const VPosBase* a) const = 0;
32 virtual Uptr<VPosBase> vexec(const VPosBase* a) const = 0;
33 };
34
35 template <class PosT>
52
53 template <class PosT1, class PosT2>
76
77 template <class PosT>
97
98
99 template <class PosT1, class PosT2>
120
121 /*
122 // defined as empty since they should never instanciated
123 template <SizeT N>
124 class VPos<SPos<N>>
125 {};
126
127 // defined as empty since they should never instanciated
128 template <SizeT N>
129 class VPosRef<SPos<N>>
130 {};
131 */
132 // defined as empty since they should never instanciated
133 template <SizeT N, SizeT... Ms>
135 {};
136
137 // defined as empty since they should never instanciated
138 template <SizeT N, SizeT... Ms>
139 class VPosRef<SFPos<N,Ms...>>
140 {};
141
142 // defined as empty since they should never instanciated
143 template <>
144 class VPos<DPos>
145 {};
146
147 // defined as empty since they should never instanciated
148 template <>
150 {};
151
152 // defined as empty since they should never instanciated
153 template <>
155 {};
156
157 // defined as empty since they should never instanciated
158 template <>
160 {};
161
162 template <class PosT>
164 {
165 static inline decltype(auto) make(const VPosBase* a);
166 };
167
168 template <class PosT1, class PosT2>
169 struct PosFromVPos<MPos<PosT1,PosT2>>
170 {
171 static inline decltype(auto) make(const VPosBase* a);
172 };
173
174}
175
176#endif
basic headers
virtual Uptr< VPosBase > vtimes(const VPosBase *a) const =0
virtual Uptr< VPosBase > vplus(const VPosBase *a) const =0
DEFAULT_MEMBERS(VPosBase)
virtual ~VPosBase()=default
virtual Uptr< VPosBase > vexec(const VPosBase *a) const =0
virtual SizeT vsize() const =0
virtual SizeT vval() const =0
virtual const VPosBase * vget() const =0
virtual Uptr< VPosBase > copy() const =0
virtual const VPosBase * vnext() const =0
DEFAULT_MEMBERS(VPosRef)
virtual const VPosBase * vget() const override final
DEFAULT_MEMBERS(VPos)
virtual Uptr< VPosBase > vtimes(const VPosBase *a) const override final
virtual Uptr< VPosBase > vplus(const VPosBase *a) const override final
virtual SizeT vval() const override final
VPos(const PosT &a)
virtual Uptr< VPosBase > copy() const override final
virtual Uptr< VPosBase > vexec(const VPosBase *a) const override final
virtual SizeT vsize() const override final
virtual const VPosBase * vnext() const override final
uint64_t SizeT
Definition types.h:38
std::unique_ptr< T > Uptr
Definition types.h:54
Sptr< Range > rangeCast(const RangePtr r)