4#ifndef vtkDataArrayMeta_h
5#define vtkDataArrayMeta_h
9#include "vtkDebugRangeIterators.h"
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
49VTK_ABI_NAMESPACE_BEGIN
50template <
typename ValueType>
56VTK_ABI_NAMESPACE_BEGIN
66VTK_ABI_NAMESPACE_BEGIN
84template <ComponentIdType Size>
85struct IsValidTupleSize : std::integral_constant<bool, (Size > 0 || Size == DynamicTupleSize)>
89template <ComponentIdType TupleSize>
94template <ComponentIdType Size>
99template <ComponentIdType TupleSize>
104template <ComponentIdType S1, ComponentIdType S2>
106 : std::integral_constant<bool, (IsStaticTupleSize<S1>::value && IsStaticTupleSize<S2>::value)>
110template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
112 typename std::enable_if<AreStaticTupleSizes<S1, S2>::value, T>::type;
116template <ComponentIdType S1, ComponentIdType S2>
118 : std::integral_constant<bool, (!IsStaticTupleSize<S1>::value || !IsStaticTupleSize<S2>::value)>
122template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
124 typename std::enable_if<IsEitherTupleSizeDynamic<S1, S2>::value, T>::type;
129template <ComponentIdType TupleSize>
135 using Superclass = std::integral_constant<ComponentIdType, TupleSize>;
139 using Superclass::Superclass;
155 : value(array->GetNumberOfComponents())
165template <
typename ArrayType>
168 using APIType =
typename ArrayType::ValueType;
179VTK_ABI_NAMESPACE_BEGIN
183template <
typename ArrayType,
typename = detail::EnableIfVtkDataArray<ArrayType>>
191VTK_ABI_NAMESPACE_BEGIN
193template <
typename ArrayType>
197 static constexpr bool value = std::is_base_of<vtkAOSDataArrayTemplate<APIType>, ArrayType>
::value;
203VTK_ABI_NAMESPACE_BEGIN
206template <
typename ArrayType>
207using IsAOSDataArray = std::integral_constant<bool, detail::IsAOSDataArrayImpl<ArrayType>::value>;
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