16#ifndef vtkDataArrayMeta_h
17#define vtkDataArrayMeta_h
21#include "vtkDebugRangeIterators.h"
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
61template <
typename ValueType>
91template <ComponentIdType Size>
92struct IsValidTupleSize : std::integral_constant<bool, (Size > 0 || Size == DynamicTupleSize)>
96template <ComponentIdType TupleSize>
101template <ComponentIdType Size>
106template <ComponentIdType TupleSize>
111template <ComponentIdType S1, ComponentIdType S2>
113 : std::integral_constant<bool, (IsStaticTupleSize<S1>::value && IsStaticTupleSize<S2>::value)>
117template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
123template <ComponentIdType S1, ComponentIdType S2>
125 : std::integral_constant<bool, (!IsStaticTupleSize<S1>::value || !IsStaticTupleSize<S2>::value)>
129template <ComponentIdType S1, ComponentIdType S2,
typename T =
void>
136template <ComponentIdType TupleSize>
142 using Superclass = std::integral_constant<ComponentIdType, TupleSize>;
146 using Superclass::Superclass;
162 :
value(array->GetNumberOfComponents())
172template <
typename ArrayType>
175 using APIType =
typename ArrayType::ValueType;
187template <
typename ArrayType,
typename = detail::EnableIfVtkDataArray<ArrayType>>
194template <
typename ArrayType>
198 static constexpr bool value = std::is_base_of<vtkAOSDataArrayTemplate<APIType>, ArrayType>
::value;
205template <
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