4 #ifndef vtkDataArrayMeta_h
5 #define vtkDataArrayMeta_h
9 #include "vtkDebugRangeIterators.h"
11 #include "vtkSetGet.h"
14 #include <type_traits>
28 #if defined(VTK_DEBUG_RANGE_ITERATORS)
29 #define VTK_ITER_ASSERT(x, msg) assert((x) && msg)
31 #define VTK_ITER_ASSERT(x, msg)
34 #if (defined(VTK_ALWAYS_OPTIMIZE_ARRAY_ITERATORS) || !defined(VTK_DEBUG_RANGE_ITERATORS)) && \
35 !defined(VTK_COMPILER_MSVC)
36 #define VTK_ITER_INLINE VTK_ALWAYS_INLINE
37 #define VTK_ITER_ASSUME VTK_ASSUME_NO_ASSERT
38 #define VTK_ITER_OPTIMIZE_START VTK_ALWAYS_OPTIMIZE_START
39 #define VTK_ITER_OPTIMIZE_END VTK_ALWAYS_OPTIMIZE_END
41 #define VTK_ITER_INLINE inline
42 #define VTK_ITER_ASSUME VTK_ASSUME
43 #define VTK_ITER_OPTIMIZE_START
44 #define VTK_ITER_OPTIMIZE_END
50 VTK_ABI_NAMESPACE_BEGIN
51 template <
typename ValueType>
57 VTK_ABI_NAMESPACE_BEGIN
67 VTK_ABI_NAMESPACE_BEGIN
85 template <ComponentIdType Size>
86 struct IsValidTupleSize : std::integral_constant<bool, (Size > 0 || Size == DynamicTupleSize)>
90 template <ComponentIdType TupleSize>
95 template <ComponentIdType Size>
100 template <ComponentIdType TupleSize>
105 template <ComponentIdType S1, ComponentIdType S2>
107 : std::integral_constant<bool, (IsStaticTupleSize<S1>::value && IsStaticTupleSize<S2>::value)>
111 template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
117 template <ComponentIdType S1, ComponentIdType S2>
119 : std::integral_constant<bool, (!IsStaticTupleSize<S1>::value || !IsStaticTupleSize<S2>::value)>
123 template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
130 template <ComponentIdType TupleSize>
136 using Superclass = std::integral_constant<ComponentIdType, TupleSize>;
140 using Superclass::Superclass;
156 :
value(array->GetNumberOfComponents())
166 template <
typename ArrayType,
typename ForceValueTypeForVtkDataArray =
double>
169 using APIType =
typename ArrayType::ValueType;
171 template <
typename ForceValueTypeForVtkDataArray>
174 using APIType = ForceValueTypeForVtkDataArray;
177 VTK_ABI_NAMESPACE_END
180 VTK_ABI_NAMESPACE_BEGIN
184 template <
typename ArrayType,
typename ForceValueTypeForVtkDataArray = double,
189 VTK_ABI_NAMESPACE_END
194 VTK_ABI_NAMESPACE_BEGIN
196 template <
typename ArrayType>
200 static constexpr
bool value = std::is_base_of<vtkAOSDataArrayTemplate<APIType>, ArrayType>
::value;
203 VTK_ABI_NAMESPACE_END
206 VTK_ABI_NAMESPACE_BEGIN
209 template <
typename ArrayType>
212 VTK_ABI_NAMESPACE_END
Array-Of-Structs implementation of vtkGenericDataArray.
abstract superclass for arrays of numeric data
typename std::enable_if< IsValidTupleSize< TupleSize >::value >::type EnableIfValidTupleSize
typename std::enable_if< IsStaticTupleSize< TupleSize >::value >::type EnableIfStaticTupleSize
typename std::enable_if< IsVtkDataArray< T >::value >::type EnableIfVtkDataArray
typename std::enable_if< AreStaticTupleSizes< S1, S2 >::value, T >::type EnableIfStaticTupleSizes
static constexpr ComponentIdType DynamicTupleSize
typename std::enable_if< IsEitherTupleSizeDynamic< S1, S2 >::value, T >::type EnableIfEitherTupleSizeIsDynamic
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
typename detail::GetAPITypeImpl< ArrayType, ForceValueTypeForVtkDataArray >::APIType GetAPIType
std::integral_constant< bool, detail::IsAOSDataArrayImpl< ArrayType >::value > IsAOSDataArray
VTK_ITER_INLINE GenericTupleSize() noexcept
VTK_ITER_INLINE value_type operator()() const noexcept
ComponentIdType value_type
VTK_ITER_INLINE GenericTupleSize(vtkDataArray *array)
VTK_ITER_INLINE GenericTupleSize() noexcept=default
ForceValueTypeForVtkDataArray APIType
typename ArrayType::ValueType APIType
static constexpr bool value
GetAPIType< ArrayType > APIType