16 #ifndef vtkDataArrayMeta_h
17 #define vtkDataArrayMeta_h
20 #include "vtkConfigure.h"
23 #include "vtkSetGet.h"
26 #include <type_traits>
40 #if defined(VTK_DEBUG_RANGE_ITERATORS)
41 #define VTK_ITER_ASSERT(x, msg) assert((x) && msg)
43 #define VTK_ITER_ASSERT(x, msg)
46 #if defined(VTK_ALWAYS_OPTIMIZE_ARRAY_ITERATORS) && !defined(VTK_DEBUG_RANGE_ITERATORS)
47 #define VTK_ITER_INLINE VTK_ALWAYS_INLINE
48 #define VTK_ITER_ASSUME VTK_ASSUME_NO_ASSERT
49 #define VTK_ITER_OPTIMIZE_START VTK_ALWAYS_OPTIMIZE_START
50 #define VTK_ITER_OPTIMIZE_END VTK_ALWAYS_OPTIMIZE_START
52 #define VTK_ITER_INLINE inline
53 #define VTK_ITER_ASSUME VTK_ASSUME
54 #define VTK_ITER_OPTIMIZE_START
55 #define VTK_ITER_OPTIMIZE_END
61 template <
typename ValueType>
91 template <ComponentIdType Size>
92 struct IsValidTupleSize : std::integral_constant<bool, (Size > 0 || Size == DynamicTupleSize)>
96 template <ComponentIdType TupleSize>
101 template <ComponentIdType Size>
106 template <ComponentIdType TupleSize>
111 template <ComponentIdType S1, ComponentIdType S2>
113 : std::integral_constant<bool, (IsStaticTupleSize<S1>::value && IsStaticTupleSize<S2>::value)>
117 template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
123 template <ComponentIdType S1, ComponentIdType S2>
125 : std::integral_constant<bool, (!IsStaticTupleSize<S1>::value || !IsStaticTupleSize<S2>::value)>
129 template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
136 template <ComponentIdType TupleSize>
142 using Superclass = std::integral_constant<ComponentIdType, TupleSize>;
146 using Superclass::Superclass;
159 :
value(array->GetNumberOfComponents())
169 template <
typename ArrayType>
172 using APIType =
typename ArrayType::ValueType;
184 template <
typename ArrayType,
typename = detail::EnableIfVtkDataArray<ArrayType> >
191 template <
typename ArrayType>
195 static constexpr
bool value = std::is_base_of<vtkAOSDataArrayTemplate<APIType>, ArrayType>
::value;
202 template <
typename ArrayType>
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 >::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
typename ArrayType::ValueType APIType
static constexpr bool value
GetAPIType< ArrayType > APIType