8 #ifndef vtkDataArrayTupleRange_Generic_h
9 #define vtkDataArrayTupleRange_Generic_h
17 #include <type_traits>
25 VTK_ABI_NAMESPACE_BEGIN
28 template <
typename ArrayType, ComponentIdType>
30 template <
typename ArrayType, ComponentIdType>
32 template <
typename ArrayType, ComponentIdType>
34 template <
typename ArrayType, ComponentIdType>
36 template <
typename ArrayType, ComponentIdType>
38 template <
typename ArrayType, ComponentIdType>
40 template <
typename ArrayType, ComponentIdType>
42 template <
typename ArrayType, ComponentIdType>
44 template <
typename ArrayType, ComponentIdType>
49 template <
typename ArrayType, ComponentIdType TupleSize>
82 tuple >= 0 && tuple <= array->GetNumberOfTuples(),
"Invalid tuple accessed by iterator.");
84 "Invalid component accessed by iterator.");
107 this->
Array = o.Array;
118 this->
Array = std::move(o.Array);
119 this->
NumComps = std::move(o.NumComps);
147 template <
typename ArrayType, ComponentIdType TupleSize>
180 tuple >= 0 && tuple <= array->GetNumberOfTuples(),
"Invalid tuple accessed by iterator.");
182 "Invalid component accessed by iterator.");
195 return *
this =
static_cast<APIType
>(o);
199 this->
Array = o.Array;
213 return *
this = std::move(static_cast<APIType>(o));
217 this->
Array = std::move(o.Array);
218 this->
NumComps = std::move(o.NumComps);
226 template <
typename OArray, ComponentIdType OSize>
229 const APIType tmp = o;
230 return *
this = std::move(tmp);
264 APIType tmp =
static_cast<APIType
>(lhs);
265 lhs =
static_cast<APIType
>(rhs);
266 rhs = std::move(tmp);
269 template <
typename OArray, ComponentIdType OSize>
277 APIType tmp =
static_cast<APIType
>(lhs);
278 lhs =
static_cast<APIType
>(rhs);
279 rhs = std::move(tmp);
284 APIType tmp =
static_cast<APIType
>(lhs);
285 lhs = std::move(rhs);
286 rhs = std::move(tmp);
291 APIType tmp = std::move(lhs);
292 lhs =
static_cast<APIType
>(rhs);
293 rhs = std::move(tmp);
299 const APIType newVal = *
this + 1;
307 const APIType retVal = *
this;
315 const APIType newVal = *
this - 1;
323 const APIType retVal = *
this;
328 #define VTK_REF_OP_OVERLOADS(Op, ImplOp) \
329 friend VTK_ITER_INLINE ComponentReference operator Op( \
330 ComponentReference lhs, APIType val) noexcept \
332 const APIType newVal = lhs ImplOp val; \
336 friend VTK_ITER_INLINE ComponentReference operator Op( \
337 ComponentReference lhs, ComponentReference val) noexcept \
339 const APIType newVal = lhs ImplOp val; \
343 friend VTK_ITER_INLINE APIType& operator Op(APIType & lhs, ComponentReference val) noexcept \
345 const APIType newVal = lhs ImplOp val; \
358 #undef VTK_REF_OP_OVERLOADS
367 this->
Array = o.Array;
381 template <
typename ArrayType, ComponentIdType TupleSize>
416 "Const component iterator at invalid tuple id.");
418 "Const component iterator at invalid component id.");
423 : Array{ o.GetArray() }
424 , NumComps{ o.GetNumComps() }
425 , TupleId{ o.GetTupleId() }
426 , ComponentId{ o.GetComponentId() }
439 VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
440 "Const component iterator at invalid component id.");
448 this->ComponentId++ };
455 VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
456 "Const component iterator at invalid component id.");
464 this->ComponentId-- };
470 return reference{ this->Array, this->NumComps, this->TupleId, this->ComponentId + i };
476 return reference{ this->Array, this->NumComps, this->TupleId, this->ComponentId };
479 #define VTK_TMP_MAKE_OPERATOR(OP) \
480 friend VTK_ITER_INLINE bool operator OP( \
481 const ConstComponentIterator& lhs, const ConstComponentIterator& rhs) noexcept \
483 VTK_ITER_ASSERT(lhs.Array == rhs.Array, "Mismatched arrays in iterator comparison."); \
484 VTK_ITER_ASSERT(lhs.TupleId == rhs.TupleId, "Mismatched tuple ids in iterator comparison."); \
485 VTK_ITER_ASSUME(lhs.NumComps.value > 0); \
486 VTK_ITER_ASSUME(lhs.NumComps.value == rhs.NumComps.value); \
487 return lhs.ComponentId OP rhs.ComponentId; \
497 #undef VTK_TMP_MAKE_OPERATOR
502 this->ComponentId +=
offset;
503 VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
504 "Const component iterator at invalid component id.");
523 this->ComponentId -=
offset;
524 VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
525 "Const component iterator at invalid component id.");
538 VTK_ITER_ASSERT(it1.Array == it2.Array,
"Cannot do math with iterators from different arrays.");
540 "Cannot do math with component iterators from different "
542 return it1.ComponentId - it2.ComponentId;
549 VTK_ITER_ASSERT(lhs.Array == rhs.Array,
"Cannot swap iterators from different arrays.");
552 swap(lhs.TupleId, rhs.TupleId);
553 swap(lhs.ComponentId, rhs.ComponentId);
557 mutable ArrayType* Array;
558 NumCompsType NumComps;
565 template <
typename ArrayType, ComponentIdType TupleSize>
566 struct ComponentIterator
572 using NumCompsType = GenericTupleSize<TupleSize>;
588 :
Ref(array, numComps, tupleId, comp)
593 "Component iterator at invalid tuple id.");
595 comp >= 0 && comp <= numComps.value,
"Component iterator at invalid component id.");
604 this->
Ref.CopyReference(o.Ref);
611 ++this->
Ref.ComponentId;
612 VTK_ITER_ASSERT(this->
Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
613 "Component iterator at invalid component id.");
621 this->
Ref.ComponentId++ };
627 --this->
Ref.ComponentId;
628 VTK_ITER_ASSERT(this->
Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
629 "Component iterator at invalid component id.");
637 this->
Ref.ComponentId-- };
644 this->
Ref.ComponentId + i };
653 #define VTK_TMP_MAKE_OPERATOR(OP) \
654 friend VTK_ITER_INLINE bool operator OP( \
655 const ComponentIterator& lhs, const ComponentIterator& rhs) noexcept \
658 lhs.GetArray() == rhs.GetArray(), "Mismatched arrays in iterator comparison."); \
660 lhs.GetTupleId() == rhs.GetTupleId(), "Mismatched tuple ids in iterator comparison."); \
661 VTK_ITER_ASSUME(lhs.GetNumComps().value > 0); \
662 VTK_ITER_ASSUME(lhs.GetNumComps().value == rhs.GetNumComps().value); \
663 return lhs.GetComponentId() OP rhs.GetComponentId(); \
673 #undef VTK_TMP_MAKE_OPERATOR
679 VTK_ITER_ASSERT(this->
Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
680 "Component iterator at invalid component id.");
688 it.GetComponentId() +
offset };
695 it.GetComponentId() +
offset };
702 VTK_ITER_ASSERT(this->
Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
703 "Component iterator at invalid component id.");
711 it.GetComponentId() -
offset };
718 "Cannot do math with component iterators from different "
721 "Cannot do math with component iterators from different "
723 return it1.GetComponentId() - it2.GetComponentId();
730 lhs.GetArray() == rhs.GetArray(),
"Cannot swap iterators from different arrays.");
733 swap(lhs.GetTupleId(), rhs.GetTupleId());
734 swap(lhs.GetComponentId(), rhs.GetComponentId());
755 template <
typename ArrayType, ComponentIdType TupleSize>
788 "Const tuple reference at invalid tuple id.");
825 template <
typename VT = APIType>
827 double* tuple)
const noexcept
835 tuple[comp] =
static_cast<double>(this->
Array->GetComponent(this->
TupleId, comp));
842 tuple[comp] =
static_cast<double>(this->
Array->GetTypedComponent(this->
TupleId, comp));
848 template <
typename OArrayType, ComponentIdType OSize>
855 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
858 static_assert(TupleSize == OSize,
"Cannot compare tuples with different sizes.");
860 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
864 template <
typename OArrayType, ComponentIdType OSize>
871 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
874 other.size() == this->
NumComps.value,
"Cannot compare tuples with different sizes.");
876 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
880 template <
typename OArrayType, ComponentIdType OSize>
887 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
890 static_assert(TupleSize == OSize,
"Cannot compare tuples with different sizes.");
892 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
896 template <
typename OArrayType, ComponentIdType OSize>
903 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
906 other.size() == this->
NumComps.value,
"Cannot compare tuples with different sizes.");
908 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
911 template <
typename OArrayType, ComponentIdType OSize>
914 return !(*
this == o);
917 template <
typename OArrayT, ComponentIdType OSize>
920 return !(*
this == o);
972 template <
typename ArrayType, ComponentIdType TupleSize>
1005 VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
1006 "Tuple reference at invalid tuple id.");
1035 template <
typename VT = APIType>
1037 double* tuple)
const noexcept
1045 tuple[comp] =
static_cast<double>(this->
Array->GetComponent(this->
TupleId, comp));
1052 tuple[comp] =
static_cast<double>(this->
Array->GetTypedComponent(this->
TupleId, comp));
1072 template <
typename VT = APIType>
1074 const double* tuple) noexcept
1082 this->
Array->SetComponent(this->
TupleId, comp, static_cast<APIType>(tuple[comp]));
1089 this->
Array->SetTypedComponent(this->
TupleId, comp, static_cast<APIType>(tuple[comp]));
1097 std::copy_n(other.cbegin(), this->
NumComps.value, this->
begin());
1102 template <
typename OArrayType, ComponentIdType OSize>
1109 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when assigning tuples.");
1112 static_assert(TupleSize == OSize,
"Cannot assign tuples with different sizes.");
1114 std::copy_n(other.cbegin(), OSize, this->
begin());
1119 template <
typename OArrayType, ComponentIdType OSize>
1126 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when assigning tuples.");
1129 other.size() == this->
NumComps.value,
"Cannot assign tuples with different sizes.");
1131 std::copy_n(other.cbegin(), this->
NumComps.value, this->
begin());
1136 template <
typename OArrayType, ComponentIdType OSize>
1143 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when assigning tuples.");
1146 static_assert(TupleSize == OSize,
"Cannot assign tuples with different sizes.");
1148 std::copy_n(other.cbegin(), OSize, this->
begin());
1153 template <
typename OArrayType, ComponentIdType OSize>
1160 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when assigning tuples.");
1163 other.size() == this->
NumComps.value,
"Cannot assign tuples with different sizes.");
1165 std::copy_n(other.cbegin(), this->
NumComps.value, this->
begin());
1170 template <
typename OArrayType, ComponentIdType OSize>
1177 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
1180 static_assert(TupleSize == OSize,
"Cannot compare tuples with different sizes.");
1182 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
1186 template <
typename OArrayType, ComponentIdType OSize>
1193 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
1196 other.size() == this->
NumComps.value,
"Cannot compare tuples with different sizes.");
1198 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
1202 template <
typename OArrayType, ComponentIdType OSize>
1209 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
1212 static_assert(TupleSize == OSize,
"Cannot compare tuples with different sizes.");
1214 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
1218 template <
typename OArrayType, ComponentIdType OSize>
1225 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when comparing tuples.");
1228 other.size() == this->
NumComps.value,
"Cannot compare tuples with different sizes.");
1230 return std::equal(this->
cbegin(), this->
cend(), other.cbegin());
1233 template <
typename OArrayType, ComponentIdType OSize>
1236 return !(*
this == o);
1239 template <
typename OArray, ComponentIdType OSize>
1242 return !(*
this == o);
1246 template <
typename OArrayType, ComponentIdType OSize>
1253 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when swapping tuples.");
1256 static_assert(TupleSize == OSize,
"Cannot swap tuples with different sizes.");
1258 std::swap_ranges(this->
begin(), this->
end(), other.begin());
1262 template <
typename OArrayType, ComponentIdType OSize>
1269 (std::is_convertible<OAPIType, APIType>{}),
"Incompatible types when swapping tuples.");
1272 other.size() == this->
NumComps.value,
"Cannot swap tuples with different sizes.");
1274 std::swap_ranges(this->
begin(), this->
end(), other.begin());
1279 template <
typename OArray, ComponentIdType OSize>
1353 template <
typename ArrayType, ComponentIdType TupleSize>
1374 : Ref(array, numComps, tupleId)
1378 VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
1379 "Const tuple iterator at invalid tuple id.");
1393 this->Ref.CopyReference(o.Ref);
1400 ++this->Ref.TupleId;
1402 this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1403 "Const tuple iterator at invalid component id.");
1410 return ConstTupleIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId++ };
1416 --this->Ref.TupleId;
1418 this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1419 "Const tuple iterator at invalid component id.");
1426 return ConstTupleIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId-- };
1432 return reference{ this->GetArray(), this->GetNumComps(), this->GetTupleId() + i };
1441 #define VTK_TMP_MAKE_OPERATOR(OP) \
1442 friend VTK_ITER_INLINE bool operator OP( \
1443 const ConstTupleIterator& lhs, const ConstTupleIterator& rhs) noexcept \
1446 lhs.GetArray() == rhs.GetArray(), "Cannot compare iterators from different arrays."); \
1447 VTK_ITER_ASSUME(lhs.GetNumComps().value > 0); \
1448 VTK_ITER_ASSUME(lhs.GetNumComps().value == rhs.GetNumComps().value); \
1449 return lhs.GetTupleId() OP rhs.GetTupleId(); \
1459 #undef VTK_TMP_MAKE_OPERATOR
1464 this->Ref.TupleId +=
offset;
1466 this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1467 "Const tuple iterator at invalid component id.");
1486 this->Ref.TupleId -=
offset;
1488 this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1489 "Const tuple iterator at invalid component id.");
1503 "Cannot do math with tuple iterators from different "
1505 return it1.GetTupleId() - it2.GetTupleId();
1512 lhs.GetArray() == rhs.GetArray(),
"Cannot swap iterators from different arrays.");
1515 swap(lhs.GetTupleId(), rhs.GetTupleId());
1520 ArrayType* GetArray() const noexcept {
return this->Ref.Array; }
1522 ArrayType*& GetArray() noexcept {
return this->Ref.Array; }
1524 NumCompsType GetNumComps() const noexcept {
return this->Ref.NumComps; }
1526 NumCompsType& GetNumComps() noexcept {
return this->Ref.NumComps; }
1528 TupleIdType GetTupleId() const noexcept {
return this->Ref.TupleId; }
1530 TupleIdType& GetTupleId() noexcept {
return this->Ref.TupleId; }
1532 ConstTupleReference<ArrayType, TupleSize> Ref;
1537 template <
typename ArrayType, ComponentIdType TupleSize>
1538 struct TupleIterator
1544 using NumCompsType = GenericTupleSize<TupleSize>;
1558 :
Ref(array, numComps, tupleId)
1563 tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
"Tuple iterator at invalid tuple id.");
1572 this->
Ref.CopyReference(o.Ref);
1579 ++this->
Ref.TupleId;
1581 this->
Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1582 "Tuple iterator at invalid component id.");
1595 --this->
Ref.TupleId;
1597 this->
Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1598 "Tuple iterator at invalid component id.");
1620 #define VTK_TMP_MAKE_OPERATOR(OP) \
1621 friend VTK_ITER_INLINE bool operator OP( \
1622 const TupleIterator& lhs, const TupleIterator& rhs) noexcept \
1625 lhs.GetArray() == rhs.GetArray(), "Cannot compare iterators from different arrays."); \
1626 VTK_ITER_ASSUME(lhs.GetNumComps().value > 0); \
1627 VTK_ITER_ASSUME(lhs.GetNumComps().value == rhs.GetNumComps().value); \
1628 return lhs.GetTupleId() OP rhs.GetTupleId(); \
1638 #undef VTK_TMP_MAKE_OPERATOR
1645 this->
Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1646 "Tuple iterator at invalid component id.");
1667 this->
Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1668 "Tuple iterator at invalid component id.");
1682 "Cannot do math with tuple iterators from different "
1684 return it1.GetTupleId() - it2.GetTupleId();
1691 lhs.GetArray() == rhs.GetArray(),
"Cannot swap iterators from different arrays.");
1694 swap(lhs.GetTupleId(), rhs.GetTupleId());
1719 template <
typename ArrayTypeT, ComponentIdType TupleSize>
1759 , BeginTuple(beginTuple)
1760 , EndTuple(endTuple)
1762 assert(this->Array);
1763 assert(beginTuple >= 0 && beginTuple <= endTuple);
1764 assert(endTuple >= 0 && endTuple <= this->Array->GetNumberOfTuples());
1767 assert(arr->GetNumberOfComponents() == TupleSize);
1774 const TupleIdType realBegin = this->BeginTuple + beginTuple;
1775 const TupleIdType realEnd = endTuple >= 0 ? this->BeginTuple + endTuple : this->EndTuple;
1777 return TupleRange{ this->Array, realBegin, realEnd };
1810 return reference{ this->Array, this->NumComps, this->BeginTuple + i };
1816 return const_reference{ this->Array, this->NumComps, this->BeginTuple + i };
1823 this->Array->GetTuple(this->BeginTuple + i, tuple);
1827 this->Array->GetTypedTuple(this->BeginTuple + i, tuple);
1831 template <
typename VT = APIType>
1833 size_type i,
double* tuple)
const noexcept
1839 tuple[comp] =
static_cast<double>(this->Array->GetComponent(i, comp));
1846 tuple[comp] =
static_cast<double>(this->Array->GetTypedComponent(i, comp));
1855 this->Array->SetTuple(this->BeginTuple + i, tuple);
1859 this->Array->SetTypedTuple(this->BeginTuple + i, tuple);
1863 template <
typename VT = APIType>
1865 size_type i,
const double* tuple) noexcept
1871 this->Array->SetComponent(this->BeginTuple + i, comp, static_cast<ValueType>(tuple[comp]));
1878 this->Array->SetTypedComponent(
1879 this->BeginTuple + i, comp, static_cast<ValueType>(tuple[comp]));
1895 NumCompsType NumComps{};
1901 template <
typename ArrayType, ComponentIdType TupleSize>
1904 VTK_ABI_NAMESPACE_END
1910 #endif // __VTK_WRAP__
const NumCompsType & GetNumComps() const noexcept
friend VTK_ITER_INLINE void swap(ComponentReference lhs, ComponentReference rhs) noexcept
VTK_ITER_INLINE APIType operator--(int) noexcept
VTK_ITER_INLINE void CopyReference(const TupleReference &o) noexcept
friend VTK_ITER_INLINE void swap(ComponentIterator &lhs, ComponentIterator &rhs) noexcept
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
TupleReference< ArrayType, TupleSize > TupleReferenceType
VTK_ITER_INLINE TupleReference() noexcept
friend VTK_ITER_INLINE ComponentIterator operator+(const ComponentIterator &it, difference_type offset) noexcept
friend VTK_ITER_INLINE void swap(ConstComponentIterator &lhs, ConstComponentIterator &rhs) noexcept
friend VTK_ITER_INLINE ConstComponentIterator operator+(difference_type offset, const ConstComponentIterator &it) noexcept
void VTK_ITER_INLINE GetTuple(size_type i, ValueType *tuple) const noexcept
VTK_ITER_INLINE iterator end() noexcept
friend VTK_ITER_INLINE ConstTupleIterator operator-(const ConstTupleIterator &it, difference_type offset) noexcept
const TupleIdType & GetTupleId() const noexcept
VTK_ITER_INLINE const pointer & operator->() const noexcept
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, void > swap(TupleReference< OArrayType, OSize > other) noexcept
VTK_ITER_INLINE ConstComponentIterator(ArrayType *array, NumCompsType numComps, TupleIdType tupleId, ComponentIdType comp) noexcept
friend VTK_ITER_INLINE ComponentIterator operator+(difference_type offset, const ComponentIterator &it) noexcept
VTK_ITER_INLINE APIType operator++(int) noexcept
VTK_ITER_INLINE reference operator*() const noexcept
ConstTupleIteratorType const_iterator
friend VTK_ITER_INLINE ConstComponentIterator operator+(const ConstComponentIterator &it, difference_type offset) noexcept
VTK_ITER_INLINE pointer & operator->() noexcept
std::enable_if_t< IsEitherTupleSizeDynamic< S1, S2 >::value, T > EnableIfEitherTupleSizeIsDynamic
VTK_ITER_INLINE TupleIterator & operator--() noexcept
std::enable_if_t<!std::is_same_v< VT, double > > VTK_ITER_INLINE GetTuple(size_type i, double *tuple) const noexcept
TupleReference< ArrayType, TupleSize > Ref
friend VTK_ITER_INLINE ConstTupleIterator operator+(difference_type offset, const ConstTupleIterator &it) noexcept
friend VTK_ITER_INLINE TupleIterator operator-(const TupleIterator &it, difference_type offset) noexcept
VTK_ITER_INLINE TupleRange() noexcept=default
VTK_ITER_INLINE void CopyReference(const ComponentReference &o) noexcept
VTK_ITER_INLINE NumCompsType GetNumComps() const noexcept
Abstract superclass for all arrays.
VTK_ITER_INLINE const_iterator begin() const noexcept
friend VTK_ITER_INLINE void swap(TupleIterator &lhs, TupleIterator &rhs) noexcept
VTK_ITER_INLINE void GetTuple(APIType *tuple) const noexcept
typename detail::GetAPITypeImpl< ArrayType, ForceValueTypeForVtkDataArray >::APIType GetAPIType
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
VTK_ITER_INLINE iterator NewIterator(ComponentIdType comp) const noexcept
VTK_ITER_INLINE ConstTupleReference(const TupleReference< ArrayType, TupleSize > &o) noexcept
VTK_ITER_INLINE reference operator[](size_type i) noexcept
VTK_ITER_INLINE ConstComponentIterator operator--(int) noexcept
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
VTK_ITER_INLINE const_iterator cend() const noexcept
VTK_ITER_INLINE reference operator[](size_type i) noexcept
VTK_ITER_INLINE ComponentReference operator--() noexcept
VTK_ITER_INLINE ConstTupleIterator & operator-=(difference_type offset) noexcept
VTK_ITER_INLINE const_iterator cbegin() const noexcept
GetAPIType< ArrayType > APIType
friend VTK_ITER_INLINE TupleIterator operator+(const TupleIterator &it, difference_type offset) noexcept
VTK_ITER_INLINE TupleReference & operator=(const TupleReference &other) noexcept
VTK_ITER_INLINE ConstTupleIterator(const TupleIterator< ArrayType, TupleSize > &o) noexcept
VTK_ITER_INLINE ConstComponentReference(const ComponentReference< ArrayType, TupleSize > &o)
VTK_ITER_INLINE ComponentReference(ArrayType *array, NumCompsType numComps, TupleIdType tuple, ComponentIdType comp) noexcept
VTK_ITER_INLINE ArrayType * GetArray() const noexcept
VTK_ITER_INLINE ConstTupleIterator() noexcept=default
friend VTK_ITER_INLINE TupleIterator operator+(difference_type offset, const TupleIterator &it) noexcept
VTK_ITER_INLINE const_iterator end() const noexcept
ComponentIdType ComponentId
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
friend VTK_ITER_INLINE difference_type operator-(const TupleIterator &it1, const TupleIterator &it2) noexcept
VTK_ITER_INLINE ConstTupleIterator & operator=(const ConstTupleIterator &o) noexcept
VTK_ITER_INLINE iterator begin() noexcept
friend VTK_ITER_INLINE difference_type operator-(const ConstTupleIterator &it1, const ConstTupleIterator &it2) noexcept
VTK_ITER_INLINE const_iterator end() const noexcept
VTK_ITER_INLINE TupleRange GetSubRange(TupleIdType beginTuple=0, TupleIdType endTuple=-1) const noexcept
TupleIdType & GetTupleId() noexcept
VTK_ITER_INLINE ConstComponentIterator & operator--() noexcept
ComponentIdType difference_type
VTK_ITER_INLINE bool operator!=(const TupleReference< OArrayType, OSize > &o) const noexcept
VTK_ITER_INLINE const_iterator NewConstIterator(ComponentIdType comp) const noexcept
VTK_ITER_INLINE TupleIdType & GetTupleId() noexcept
VTK_ITER_INLINE reference operator[](difference_type i) const noexcept
friend VTK_ITER_INLINE ConstTupleIterator operator+(const ConstTupleIterator &it, difference_type offset) noexcept
VTK_ITER_INLINE NumCompsType & GetNumComps() noexcept
VTK_ITER_INLINE ConstComponentIterator operator++(int) noexcept
VTK_ITER_INLINE ComponentReference operator=(const ComponentReference< OArray, OSize > &o) noexcept
VTK_ITER_INLINE bool operator!=(const ConstTupleReference< OArrayT, OSize > &o) const noexcept
VTK_ITER_INLINE const_iterator cend() const noexcept
GetAPIType< ArrayType > value_type
friend VTK_ITER_INLINE void swap(APIType &lhs, ComponentReference rhs) noexcept
TupleIdType difference_type
VTK_ITER_INLINE const_iterator cbegin() const noexcept
VTK_ITER_INLINE bool operator!=(const TupleReference< OArrayType, OSize > &o) const noexcept
VTK_ITER_INLINE ArrayType *& GetArray() noexcept
friend VTK_ITER_INLINE void swap(TupleReference a, TupleReference< OArray, OSize > b) noexcept
VTK_ITER_INLINE ConstTupleIterator operator--(int) noexcept
const ComponentIdType & GetComponentId() const noexcept
VTK_ITER_INLINE reference operator*() const noexcept
VTK_ITER_INLINE ConstComponentReference(ArrayType *array, NumCompsType numComps, TupleIdType tuple, ComponentIdType comp) noexcept
std::enable_if_t<!std::is_same_v< VT, double > > VTK_ITER_INLINE SetTuple(size_type i, const double *tuple) noexcept
friend VTK_ITER_INLINE ComponentIterator operator-(const ComponentIterator &it, difference_type offset) noexcept
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
VTK_ITER_INLINE TupleIterator operator--(int) noexcept
VTK_ITER_INLINE pointer operator->() noexcept
VTK_ITER_INLINE ComponentIterator & operator+=(difference_type offset) noexcept
VTK_ITER_INLINE ConstComponentReference() noexcept
VTK_ITER_INLINE size_type size() const noexcept
VTK_ITER_INLINE TupleIdType GetTupleId() const noexcept
VTK_ITER_INLINE const TupleReference * operator->() const noexcept
VTK_ITER_INLINE ConstTupleIterator & operator+=(difference_type offset) noexcept
VTK_ITER_INLINE ComponentIterator operator++(int) noexcept
VTK_ITER_INLINE reference operator[](difference_type i) noexcept
VTK_ITER_INLINE TupleIterator & operator-=(difference_type offset) noexcept
VTK_ITER_INLINE TupleReference(ArrayType *array, NumCompsType numComps, TupleIdType tupleId) noexcept
void VTK_ITER_INLINE SetTuple(size_type i, const ValueType *tuple) noexcept
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
static constexpr ComponentIdType TupleSizeTag
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, TupleReference & > operator=(const TupleReference< OArrayType, OSize > &other) noexcept
ComponentIdType ComponentId
std::enable_if_t<!std::is_same_v< VT, double > > VTK_ITER_INLINE GetTuple(double *tuple) const noexcept
friend VTK_ITER_INLINE void swap(ConstTupleIterator &lhs, ConstTupleIterator &rhs) noexcept
TupleIterator< ArrayType, TupleSize > TupleIteratorType
VTK_ITER_INLINE ConstComponentIterator() noexcept
VTK_ITER_INLINE const_iterator cbegin() const noexcept
VTK_ITER_INLINE ConstComponentIterator & operator=(const ConstComponentIterator &o) noexcept=default
VTK_ITER_INLINE ConstTupleReference() noexcept
VTK_ITER_INLINE iterator end() noexcept
VTK_ITER_INLINE const_iterator NewConstIterator(ComponentIdType comp) const noexcept
ComponentIdType size_type
VTK_ITER_INLINE void GetTuple(APIType *tuple) const noexcept
std::random_access_iterator_tag iterator_category
VTK_ITER_INLINE const_iterator begin() const noexcept
VTK_ITER_INLINE ConstComponentIterator & operator+=(difference_type offset) noexcept
friend VTK_ITER_INLINE ConstComponentIterator operator-(const ConstComponentIterator &it, difference_type offset) noexcept
VTK_ITER_INLINE void SetTuple(const APIType *tuple) noexcept
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
VTK_ITER_INLINE const_iterator cend() const noexcept
NumCompsType & GetNumComps() noexcept
VTK_ITER_INLINE ConstComponentReference & operator=(ConstComponentReference &&o) noexcept
VTK_ITER_INLINE TupleIterator() noexcept=default
ComponentIdType & GetComponentId() noexcept
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
std::random_access_iterator_tag iterator_category
VTK_ITER_INLINE const_iterator begin() const noexcept
VTK_ITER_INLINE ConstComponentIterator(const ComponentIterator< ArrayType, TupleSize > &o) noexcept
VTK_ITER_INLINE reference operator[](difference_type i) noexcept
VTK_ITER_INLINE ComponentReference operator=(APIType val) noexcept
VTK_ITER_INLINE ComponentReference operator++() noexcept
ComponentReference< ArrayType, TupleSize > Ref
VTK_ITER_INLINE ComponentIterator() noexcept=default
VTK_ITER_INLINE ConstTupleIterator & operator++() noexcept
VTK_ITER_INLINE ConstTupleReference(ArrayType *array, NumCompsType numComps, TupleIdType tupleId) noexcept
VTK_ITER_INLINE ArrayType * GetArray() const noexcept
VTK_ITER_INLINE ConstTupleIterator operator++(int) noexcept
VTK_ITER_INLINE reference operator*() noexcept
VTK_ITER_INLINE size_type size() const noexcept
VTK_ITER_INLINE ComponentReference() noexcept
TupleRange< AOSArrayType, TupleSize > DeclareTupleRangeSpecialization(ArrayType *)
VTK_ITER_INLINE size_type size() const noexcept
VTK_ITER_INLINE ComponentIdType GetTupleSize() const noexcept
ConstTupleIterator< ArrayType, TupleSize > ConstTupleIteratorType
VTK_ITER_INLINE ConstTupleIterator & operator--() noexcept
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, TupleReference & > operator=(const ConstTupleReference< OArrayType, OSize > &other) noexcept
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
VTK_ITER_INLINE TupleIterator & operator=(const TupleIterator &o) noexcept
VTK_ITER_INLINE ConstComponentIterator & operator-=(difference_type offset) noexcept
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
#define VTK_TMP_MAKE_OPERATOR(OP)
ComponentIdType difference_type
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, TupleReference & > operator=(const TupleReference< OArrayType, OSize > &other) noexcept
VTK_ITER_INLINE TupleIterator & operator++() noexcept
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
VTK_ITER_INLINE const ConstTupleReference * operator->() const noexcept
VTK_ITER_INLINE void CopyReference(const ConstTupleReference &o) noexcept
VTK_ITER_INLINE void fill(const value_type &v) noexcept
VTK_ITER_INLINE const_iterator end() const noexcept
VTK_ITER_INLINE TupleIdType GetEndTupleId() const noexcept
VTK_ITER_INLINE iterator begin() noexcept
friend VTK_ITER_INLINE difference_type operator-(const ConstComponentIterator &it1, const ConstComponentIterator &it2) noexcept
friend VTK_ITER_INLINE void swap(ComponentReference lhs, ComponentReference< OArray, OSize > rhs) noexcept
std::enable_if_t<!std::is_same_v< VT, double > > VTK_ITER_INLINE SetTuple(const double *tuple) noexcept
VTK_ITER_INLINE TupleIterator operator++(int) noexcept
VTK_ITER_INLINE ComponentIterator & operator-=(difference_type offset) noexcept
friend VTK_ITER_INLINE difference_type operator-(const ComponentIterator &it1, const ComponentIterator &it2) noexcept
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
std::random_access_iterator_tag iterator_category
ConstTupleReference< ArrayType, TupleSize > ConstTupleReferenceType
VTK_ITER_INLINE ComponentIterator operator--(int) noexcept
VTK_ITER_INLINE reference operator[](difference_type i) const noexcept
Compiler hint macros for assumptions and branch prediction.
VTK_ITER_INLINE TupleIterator & operator+=(difference_type offset) noexcept
std::enable_if_t<!std::is_same_v< VT, double > > VTK_ITER_INLINE GetTuple(double *tuple) const noexcept
VTK_ITER_INLINE ConstTupleReference & operator=(const ConstTupleReference &) noexcept=default
ArrayType * GetArray() const noexcept
VTK_ITER_INLINE ConstComponentIterator & operator++() noexcept
VTK_ITER_INLINE ComponentIterator & operator=(const ComponentIterator &o) noexcept
TupleIdType difference_type
friend VTK_ITER_INLINE void swap(TupleReference a, TupleReference b) noexcept
VTK_ITER_INLINE TupleIdType GetBeginTupleId() const noexcept
friend VTK_ITER_INLINE void swap(ComponentReference lhs, APIType &rhs) noexcept
std::random_access_iterator_tag iterator_category
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, void > swap(TupleReference< OArrayType, OSize > other) noexcept
ComponentIdType size_type
#define VTK_REF_OP_OVERLOADS(Op, ImplOp)
TupleIteratorType iterator
VTK_ITER_INLINE reference operator*() noexcept
VTK_ITER_INLINE ComponentIterator & operator--() noexcept
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, TupleReference & > operator=(const ConstTupleReference< OArrayType, OSize > &other) noexcept
VTK_ITER_INLINE ComponentIterator & operator++() noexcept
VTK_ITER_INLINE bool operator!=(const ConstTupleReference< OArray, OSize > &o) const noexcept
typename std::enable_if< AreStaticTupleSizes< S1, S2 >::value, T >::type EnableIfStaticTupleSizes
VTK_ITER_INLINE ComponentReference operator=(ComponentReference &&o) noexcept