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 #define VTK_ITER_INLINE VTK_ALWAYS_INLINE
36 #define VTK_ITER_ASSUME VTK_ASSUME_NO_ASSERT
37 #define VTK_ITER_OPTIMIZE_START VTK_ALWAYS_OPTIMIZE_START
38 #define VTK_ITER_OPTIMIZE_END VTK_ALWAYS_OPTIMIZE_START
40 #define VTK_ITER_INLINE inline
41 #define VTK_ITER_ASSUME VTK_ASSUME
42 #define VTK_ITER_OPTIMIZE_START
43 #define VTK_ITER_OPTIMIZE_END
49 VTK_ABI_NAMESPACE_BEGIN
50 template <
typename ValueType>
56 VTK_ABI_NAMESPACE_BEGIN
66 VTK_ABI_NAMESPACE_BEGIN
84 template <ComponentIdType Size>
85 struct IsValidTupleSize : std::integral_constant<bool, (Size > 0 || Size == DynamicTupleSize)>
89 template <ComponentIdType TupleSize>
94 template <ComponentIdType Size>
99 template <ComponentIdType TupleSize>
104 template <ComponentIdType S1, ComponentIdType S2>
106 : std::integral_constant<bool, (IsStaticTupleSize<S1>::value && IsStaticTupleSize<S2>::value)>
110 template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
116 template <ComponentIdType S1, ComponentIdType S2>
118 : std::integral_constant<bool, (!IsStaticTupleSize<S1>::value || !IsStaticTupleSize<S2>::value)>
122 template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
129 template <ComponentIdType TupleSize>
135 using Superclass = std::integral_constant<ComponentIdType, TupleSize>;
139 using Superclass::Superclass;
155 :
value(array->GetNumberOfComponents())
165 template <
typename ArrayType>
168 using APIType =
typename ArrayType::ValueType;
176 VTK_ABI_NAMESPACE_END
179 VTK_ABI_NAMESPACE_BEGIN
183 template <
typename ArrayType,
typename = detail::EnableIfVtkDataArray<ArrayType>>
186 VTK_ABI_NAMESPACE_END
191 VTK_ABI_NAMESPACE_BEGIN
193 template <
typename ArrayType>
197 static constexpr
bool value = std::is_base_of<vtkAOSDataArrayTemplate<APIType>, ArrayType>
::value;
200 VTK_ABI_NAMESPACE_END
203 VTK_ABI_NAMESPACE_BEGIN
206 template <
typename ArrayType>
209 VTK_ABI_NAMESPACE_END
214 #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
VTK_ITER_INLINE value_type operator()() const noexcept
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
static constexpr bool value
Array-Of-Structs implementation of vtkGenericDataArray.
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