7#ifndef vtkDataArrayValueRange_AOS_h
8#define vtkDataArrayValueRange_AOS_h
13#include "vtkDebugRangeIterators.h"
21#ifndef VTK_DEBUG_RANGE_ITERATORS
29VTK_ABI_NAMESPACE_BEGIN
33template <
typename ValueTypeT, ComponentIdType TupleSize>
69 , Begin(arr->GetPointer(beginValue))
70 , End(arr->GetPointer(endValue))
73 assert(beginValue >= 0 && beginValue <= endValue);
74 assert(endValue >= 0 && endValue <= this->Array->GetNumberOfValues());
81 std::distance(this->Array->GetPointer(0), this->Begin) + beginValue;
83 ? std::distance(this->Array->GetPointer(0), this->Begin) + endValue
84 : std::distance(this->Array->GetPointer(0), this->End);
86 return ValueRange{ this->Array, realBegin, realEnd };
98 return static_cast<ValueIdType>(this->Begin - this->Array->GetPointer(0));
104 return static_cast<ValueIdType>(this->End - this->Array->GetPointer(0));
132 NumCompsType NumComps{};
140 typename ValueType =
typename ArrayType::ValueType,
143 typename =
typename std::enable_if<IsAOSDataArray<ArrayType>::value>::type>
Array-Of-Structs implementation of vtkGenericDataArray.
ValueRange< AOSArrayType, TupleSize > DeclareValueRangeSpecialization(ArrayType *)
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
ConstReferenceType const_reference
VTK_ITER_INLINE ValueIdType GetBeginValueId() const noexcept
VTK_ITER_INLINE ArrayType * GetArray() const noexcept
VTK_ITER_INLINE const_iterator end() const noexcept
VTK_ITER_INLINE ValueRange GetSubRange(ValueIdType beginValue=0, ValueIdType endValue=-1) const noexcept
VTK_ITER_INLINE iterator begin() noexcept
ValueType const & ConstReferenceType
VTK_ITER_INLINE reference operator[](size_type i) noexcept
VTK_ITER_INLINE const_iterator cend() const noexcept
ValueType const * ConstIteratorType
VTK_ITER_INLINE size_type size() const noexcept
ValueType & ReferenceType
ConstIteratorType const_iterator
VTK_ITER_INLINE const_iterator begin() const noexcept
VTK_ITER_INLINE ValueIdType GetEndValueId() const noexcept
VTK_ITER_INLINE ValueRange() noexcept=default
VTK_ITER_INLINE iterator end() noexcept
VTK_ITER_INLINE ComponentIdType GetTupleSize() const noexcept
VTK_ITER_INLINE const_iterator cbegin() const noexcept
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
GetAPIType< ArrayTypeT > ValueType
ConstValueReference< ArrayType, TupleSize > ConstReferenceType
ValueIterator< ArrayType, TupleSize > IteratorType
ValueReference< ArrayType, TupleSize > ReferenceType
static constexpr ComponentIdType TupleSizeTag
ConstValueIterator< ArrayType, TupleSize > ConstIteratorType