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>
209 #endif // vtkDataArrayMeta_h
VTK_ITER_INLINE GenericTupleSize() noexcept=default
typename std::enable_if< IsEitherTupleSizeDynamic< S1, S2 >::value, T >::type EnableIfEitherTupleSizeIsDynamic
std::integral_constant< bool, detail::IsAOSDataArrayImpl< ArrayType >::value > IsAOSDataArray
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
static constexpr bool value
Array-Of-Structs implementation of vtkGenericDataArray.
VTK_ITER_INLINE value_type operator()() const noexcept
abstract superclass for arrays of numeric data
static constexpr ComponentIdType DynamicTupleSize
typename ArrayType::ValueType APIType
ComponentIdType value_type
GetAPIType< ArrayType > APIType
VTK_ITER_INLINE GenericTupleSize(vtkDataArray *array)
typename detail::GetAPITypeImpl< ArrayType >::APIType GetAPIType
typename std::enable_if< IsVtkDataArray< T >::value >::type EnableIfVtkDataArray
VTK_ITER_INLINE GenericTupleSize() noexcept
typename std::enable_if< IsStaticTupleSize< TupleSize >::value >::type EnableIfStaticTupleSize
VTK_ITER_INLINE GenericTupleSize(vtkDataArray *) noexcept
typename std::enable_if< IsValidTupleSize< TupleSize >::value >::type EnableIfValidTupleSize
typename std::enable_if< AreStaticTupleSizes< S1, S2 >::value, T >::type EnableIfStaticTupleSizes