VTK
vtkDataArrayTupleRange_Generic.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataArrayTupleRange_Generic.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
20 #ifndef vtkDataArrayTupleRange_Generic_h
21 #define vtkDataArrayTupleRange_Generic_h
22 
23 #include "vtkAssume.h"
24 #include "vtkDataArrayAccessor.h"
25 #include "vtkDataArrayMeta.h"
26 
27 #include <algorithm>
28 #include <cassert>
29 #include <iterator>
30 #include <type_traits>
31 
32 #ifndef __VTK_WRAP__
33 
35 
36 namespace vtk
37 {
38 
39 namespace detail
40 {
41 
42 // Forward decs for friends/args
43 template <typename ArrayType, ComponentIdType>
45 template <typename ArrayType, ComponentIdType>
47 template <typename ArrayType, ComponentIdType>
49 template <typename ArrayType, ComponentIdType>
51 template <typename ArrayType, ComponentIdType>
52 struct ConstTupleReference;
53 template <typename ArrayType, ComponentIdType>
54 struct TupleReference;
55 template <typename ArrayType, ComponentIdType>
56 struct ConstTupleIterator;
57 template <typename ArrayType, ComponentIdType>
58 struct TupleIterator;
59 template <typename ArrayType, ComponentIdType>
60 struct TupleRange;
61 
62 //------------------------------------------------------------------------------
63 // Const component reference
64 template <typename ArrayType, ComponentIdType TupleSize>
66 {
67 private:
68  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
69  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
70 
72  using APIType = GetAPIType<ArrayType>;
73 
74 public:
77  : Array{ nullptr }
78  , NumComps{}
79  , TupleId{ 0 }
80  , ComponentId{ 0 }
81  {
82  }
83 
86  ArrayType* array, NumCompsType numComps, TupleIdType tuple, ComponentIdType comp) noexcept
87  : Array{ array }
88  , NumComps{ numComps }
89  , TupleId{ tuple }
90  , ComponentId{ comp }
91  {
92  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
93  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
95  tuple >= 0 && tuple <= array->GetNumberOfTuples(), "Invalid tuple accessed by iterator.");
96  VTK_ITER_ASSERT(comp >= 0 && comp <= array->GetNumberOfComponents(),
97  "Invalid component accessed by iterator.");
98  }
99 
102  : Array{ o.Array }
103  , NumComps{ o.NumComps }
104  , TupleId{ o.TupleId }
105  , ComponentId{ o.ComponentId }
106  {
107  }
108 
110  ConstComponentReference(const ConstComponentReference& o) noexcept = default;
111 
113  ConstComponentReference(ConstComponentReference&& o) noexcept = default;
114 
117  {
118  VTK_ITER_ASSERT(!this->Array, "Const reference already initialized.");
119  // Initialize the reference.
120  this->Array = o.Array;
121  this->NumComps = o.NumComps;
122  this->TupleId = o.TupleId;
123  this->ComponentId = o.ComponentId;
124  }
125 
128  {
129  VTK_ITER_ASSERT(!this->Array, "Const reference already initialized.");
130  // Initialize the reference.
131  this->Array = std::move(o.Array);
132  this->NumComps = std::move(o.NumComps);
133  this->TupleId = std::move(o.TupleId);
134  this->ComponentId = std::move(o.ComponentId);
135  }
136 
138  operator APIType() const noexcept
139  {
140  VTK_ITER_ASSUME(this->NumComps.value > 0);
141  VTK_ITER_ASSUME(this->Array->GetNumberOfComponents() == this->NumComps.value);
143  return acc.Get(this->TupleId, this->ComponentId);
144  }
145 
146 protected:
147  mutable ArrayType* Array;
151 };
152 
153 //------------------------------------------------------------------------------
154 // Component reference
155 template <typename ArrayType, ComponentIdType TupleSize>
156 struct ComponentReference
157 {
158 private:
159  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
160  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
161 
162  using NumCompsType = GenericTupleSize<TupleSize>;
163  using APIType = GetAPIType<ArrayType>;
164 
165 public:
168  : Array{ nullptr }
169  , NumComps{}
170  , TupleId{ 0 }
171  , ComponentId{ 0 }
172  {
173  }
174 
177  ArrayType* array, NumCompsType numComps, TupleIdType tuple, ComponentIdType comp) noexcept
178  : Array{ array }
179  , NumComps{ numComps }
180  , TupleId{ tuple }
181  , ComponentId{ comp }
182  {
183  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
184  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
186  tuple >= 0 && tuple <= array->GetNumberOfTuples(), "Invalid tuple accessed by iterator.");
187  VTK_ITER_ASSERT(comp >= 0 && comp <= array->GetNumberOfComponents(),
188  "Invalid component accessed by iterator.");
189  }
190 
192  ComponentReference(const ComponentReference& o) noexcept = default;
194  ComponentReference(ComponentReference&& o) noexcept = default;
195 
198  {
199  if (this->Array)
200  { // Already initialized. Assign the value, not the reference
201  return *this = static_cast<APIType>(o);
202  }
203  else
204  { // Initialize the reference.
205  this->Array = o.Array;
206  this->NumComps = o.NumComps;
207  this->TupleId = o.TupleId;
208  this->ComponentId = o.ComponentId;
209 
210  return *this;
211  }
212  }
213 
216  {
217  if (this->Array)
218  { // Already initialized. Assign the value, not the reference
219  return *this = std::move(static_cast<APIType>(o));
220  }
221  else
222  { // Initialize the reference.
223  this->Array = std::move(o.Array);
224  this->NumComps = std::move(o.NumComps);
225  this->TupleId = std::move(o.TupleId);
226  this->ComponentId = std::move(o.ComponentId);
227 
228  return *this;
229  }
230  }
231 
232  template <typename OArray, ComponentIdType OSize>
234  { // Always copy the value for different reference types:
235  const APIType tmp = o;
236  return *this = std::move(tmp);
237  }
238 
240  operator APIType() const noexcept
241  {
242  VTK_ITER_ASSUME(this->NumComps.value > 0);
243  VTK_ITER_ASSUME(this->Array->GetNumberOfComponents() == this->NumComps.value);
245  return acc.Get(this->TupleId, this->ComponentId);
246  }
247 
249  ComponentReference operator=(APIType val) noexcept
250  {
251  VTK_ITER_ASSUME(this->NumComps.value > 0);
252  VTK_ITER_ASSUME(this->Array->GetNumberOfComponents() == this->NumComps.value);
254  acc.Set(this->TupleId, this->ComponentId, val);
255  return *this;
256  }
257 
259  { // Swap values, not references:
260  APIType tmp = std::move(static_cast<APIType>(lhs));
261  lhs = std::move(static_cast<APIType>(rhs));
262  rhs = std::move(tmp);
263  }
264 
265  template <typename OArray, ComponentIdType OSize>
266  friend VTK_ITER_INLINE void swap(
268  { // Swap values, not references:
269  using OAPIType = GetAPIType<OArray>;
270  static_assert(
271  std::is_same<APIType, OAPIType>::value, "Cannot swap components with different types.");
272 
273  APIType tmp = std::move(static_cast<APIType>(lhs));
274  lhs = std::move(static_cast<APIType>(rhs));
275  rhs = std::move(tmp);
276  }
277 
278  friend VTK_ITER_INLINE void swap(ComponentReference lhs, APIType& rhs) noexcept
279  {
280  APIType tmp = std::move(static_cast<APIType>(lhs));
281  lhs = std::move(rhs);
282  rhs = std::move(tmp);
283  }
284 
285  friend VTK_ITER_INLINE void swap(APIType& lhs, ComponentReference rhs) noexcept
286  {
287  APIType tmp = std::move(lhs);
288  lhs = std::move(static_cast<APIType>(rhs));
289  rhs = std::move(tmp);
290  }
291 
293  ComponentReference operator++() noexcept // prefix
294  {
295  const APIType newVal = *this + 1;
296  *this = newVal;
297  return *this;
298  }
299 
301  APIType operator++(int) noexcept // postfix
302  {
303  const APIType retVal = *this;
304  *this = *this + 1;
305  return retVal;
306  }
307 
309  ComponentReference operator--() noexcept // prefix
310  {
311  const APIType newVal = *this - 1;
312  *this = newVal;
313  return *this;
314  }
315 
317  APIType operator--(int) noexcept // postfix
318  {
319  const APIType retVal = *this;
320  *this = *this - 1;
321  return retVal;
322  }
323 
324 #define VTK_REF_OP_OVERLOADS(Op, ImplOp) \
325  friend VTK_ITER_INLINE ComponentReference operator Op(ComponentReference lhs, APIType val) \
326  noexcept \
327  { \
328  const APIType newVal = lhs ImplOp val; \
329  lhs = newVal; \
330  return lhs; \
331  } \
332  friend VTK_ITER_INLINE ComponentReference operator Op( \
333  ComponentReference lhs, ComponentReference val) noexcept \
334  { \
335  const APIType newVal = lhs ImplOp val; \
336  lhs = newVal; \
337  return lhs; \
338  } \
339  friend VTK_ITER_INLINE APIType& operator Op(APIType& lhs, ComponentReference val) noexcept \
340  { \
341  const APIType newVal = lhs ImplOp val; \
342  lhs = newVal; \
343  return lhs; \
344  }
345 
346  VTK_REF_OP_OVERLOADS(+=, +)
347  VTK_REF_OP_OVERLOADS(-=, -)
348  VTK_REF_OP_OVERLOADS(*=, *)
349  VTK_REF_OP_OVERLOADS(/=, /)
350 
351 #undef VTK_REF_OP_OVERLOADS
352 
353  friend struct ConstComponentReference<ArrayType, TupleSize>;
354  friend struct ComponentIterator<ArrayType, TupleSize>;
355 
356 protected:
358  void CopyReference(const ComponentReference& o) noexcept
359  {
360  this->Array = o.Array;
361  this->NumComps = o.NumComps;
362  this->TupleId = o.TupleId;
363  this->ComponentId = o.ComponentId;
364  }
365 
366  mutable ArrayType* Array;
370 };
371 
372 //------------------------------------------------------------------------------
373 // Const component iterator
374 template <typename ArrayType, ComponentIdType TupleSize>
376  : public std::iterator<std::random_access_iterator_tag, GetAPIType<ArrayType>, ComponentIdType,
377  // expected types don't have members, no op->().
378  void, ConstComponentReference<ArrayType, TupleSize> >
379 {
380 private:
381  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
382  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
383 
384  using NumCompsType = GenericTupleSize<TupleSize>;
385  using Superclass = std::iterator<std::random_access_iterator_tag, GetAPIType<ArrayType>,
387 
388 public:
389  using iterator_category = typename Superclass::iterator_category;
390  using value_type = typename Superclass::value_type;
391  using difference_type = typename Superclass::difference_type;
392  using pointer = typename Superclass::pointer;
394 
397  : Array{ nullptr }
398  , TupleId{ 0 }
399  , ComponentId{ 0 }
400  {
401  }
402 
405  ArrayType* array, NumCompsType numComps, TupleIdType tupleId, ComponentIdType comp) noexcept
406  : Array(array)
407  , NumComps(numComps)
408  , TupleId(tupleId)
409  , ComponentId(comp)
410  {
411  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
412  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
413  VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
414  "Const component iterator at invalid tuple id.");
415  VTK_ITER_ASSERT(comp >= 0 && comp <= this->NumComps.value,
416  "Const component iterator at invalid component id.");
417  }
418 
421  : Array{ o.GetArray() }
422  , NumComps{ o.GetNumComps() }
423  , TupleId{ o.GetTupleId() }
424  , ComponentId{ o.GetComponentId() }
425  {
426  }
427 
429  ConstComponentIterator(const ConstComponentIterator& o) noexcept = default;
431  ConstComponentIterator& operator=(const ConstComponentIterator& o) noexcept = default;
432 
434  ConstComponentIterator& operator++() noexcept // prefix
435  {
436  ++this->ComponentId;
437  VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
438  "Const component iterator at invalid component id.");
439  return *this;
440  }
441 
443  ConstComponentIterator operator++(int) noexcept // postfix
444  {
445  return ConstComponentIterator{ this->Array, this->NumComps, this->TupleId,
446  this->ComponentId++ };
447  }
448 
450  ConstComponentIterator& operator--() noexcept // prefix
451  {
452  --this->ComponentId;
453  VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
454  "Const component iterator at invalid component id.");
455  return *this;
456  }
457 
459  ConstComponentIterator operator--(int) noexcept // postfix
460  {
461  return ConstComponentIterator{ this->Array, this->NumComps, this->TupleId,
462  this->ComponentId-- };
463  }
464 
467  {
468  return reference{ this->Array, this->NumComps, this->TupleId, this->ComponentId + i };
469  }
470 
472  reference operator*() const noexcept
473  {
474  return reference{ this->Array, this->NumComps, this->TupleId, this->ComponentId };
475  }
476 
477 #define VTK_TMP_MAKE_OPERATOR(OP) \
478  friend VTK_ITER_INLINE bool operator OP( \
479  const ConstComponentIterator& lhs, const ConstComponentIterator& rhs) noexcept \
480  { \
481  VTK_ITER_ASSERT(lhs.Array == rhs.Array, "Mismatched arrays in iterator comparison."); \
482  VTK_ITER_ASSERT(lhs.TupleId == rhs.TupleId, "Mismatched tuple ids in iterator comparison."); \
483  VTK_ITER_ASSUME(lhs.NumComps.value > 0); \
484  VTK_ITER_ASSUME(lhs.NumComps.value == rhs.NumComps.value); \
485  return lhs.ComponentId OP rhs.ComponentId; \
486  }
487 
494 
495 #undef VTK_TMP_MAKE_OPERATOR
496 
499  {
500  this->ComponentId += offset;
501  VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
502  "Const component iterator at invalid component id.");
503  return *this;
504  }
505 
507  const ConstComponentIterator& it, difference_type offset) noexcept
508  {
509  return ConstComponentIterator{ it.Array, it.NumComps, it.TupleId, it.ComponentId + offset };
510  }
511 
513  difference_type offset, const ConstComponentIterator& it) noexcept
514  {
515  return ConstComponentIterator{ it.Array, it.NumComps, it.TupleId, it.ComponentId + offset };
516  }
517 
520  {
521  this->ComponentId -= offset;
522  VTK_ITER_ASSERT(this->ComponentId >= 0 && this->ComponentId <= this->NumComps.value,
523  "Const component iterator at invalid component id.");
524  return *this;
525  }
526 
528  const ConstComponentIterator& it, difference_type offset) noexcept
529  {
530  return ConstComponentIterator{ it.Array, it.NumComps, it.TupleId, it.ComponentId - offset };
531  }
532 
534  const ConstComponentIterator& it1, const ConstComponentIterator& it2) noexcept
535  {
536  VTK_ITER_ASSERT(it1.Array == it2.Array, "Cannot do math with iterators from different arrays.");
537  VTK_ITER_ASSERT(it1.TupleId == it2.TupleId,
538  "Cannot do math with component iterators from different "
539  "tuples.");
540  return it1.ComponentId - it2.ComponentId;
541  }
542 
543  friend VTK_ITER_INLINE void swap(
545  {
546  // Different arrays may use different iterator implementations.
547  VTK_ITER_ASSERT(lhs.Array == rhs.Array, "Cannot swap iterators from different arrays.");
548 
549  using std::swap;
550  swap(lhs.TupleId, rhs.TupleId);
551  swap(lhs.ComponentId, rhs.ComponentId);
552  }
553 
554 private:
555  mutable ArrayType* Array;
556  NumCompsType NumComps;
557  TupleIdType TupleId;
558  ComponentIdType ComponentId;
559 };
560 
561 //------------------------------------------------------------------------------
562 // Component iterator
563 template <typename ArrayType, ComponentIdType TupleSize>
564 struct ComponentIterator
565  : public std::iterator<std::random_access_iterator_tag, GetAPIType<ArrayType>, ComponentIdType,
566  ComponentReference<ArrayType, TupleSize>, ComponentReference<ArrayType, TupleSize> >
567 {
568 private:
569  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
570  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
571 
572  using NumCompsType = GenericTupleSize<TupleSize>;
573  using APIType = GetAPIType<ArrayType>;
574  using Superclass = std::iterator<std::random_access_iterator_tag, APIType, ComponentIdType,
575  ComponentReference<ArrayType, TupleSize>, ComponentReference<ArrayType, TupleSize> >;
576 
577 public:
578  using iterator_category = typename Superclass::iterator_category;
579  using value_type = typename Superclass::value_type;
580  using difference_type = typename Superclass::difference_type;
581  using pointer = typename Superclass::pointer;
583 
585  ComponentIterator() noexcept = default;
586 
588  ComponentIterator(ArrayType* array, NumCompsType numComps, TupleIdType tupleId,
589  ComponentIdType comp) noexcept : Ref(array, numComps, tupleId, comp)
590  {
591  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
592  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
593  VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
594  "Component iterator at invalid tuple id.");
596  comp >= 0 && comp <= numComps.value, "Component iterator at invalid component id.");
597  }
598 
600  ComponentIterator(const ComponentIterator& o) noexcept = default;
601 
604  {
605  this->Ref.CopyReference(o.Ref);
606  return *this;
607  }
608 
610  ComponentIterator& operator++() noexcept // prefix
611  {
612  ++this->Ref.ComponentId;
613  VTK_ITER_ASSERT(this->Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
614  "Component iterator at invalid component id.");
615  return *this;
616  }
617 
619  ComponentIterator operator++(int) noexcept // postfix
620  {
621  return ComponentIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId,
622  this->Ref.ComponentId++ };
623  }
624 
626  ComponentIterator& operator--() noexcept // prefix
627  {
628  --this->Ref.ComponentId;
629  VTK_ITER_ASSERT(this->Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
630  "Component iterator at invalid component id.");
631  return *this;
632  }
633 
635  ComponentIterator operator--(int) noexcept // postfix
636  {
637  return ComponentIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId,
638  this->Ref.ComponentId-- };
639  }
640 
643  {
644  return reference{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId,
645  this->Ref.ComponentId + i };
646  }
647 
649  reference operator*() const noexcept { return this->Ref; }
650 
652  const pointer& operator->() const noexcept { return this->Ref; }
653 
654 #define VTK_TMP_MAKE_OPERATOR(OP) \
655  friend VTK_ITER_INLINE bool operator OP( \
656  const ComponentIterator& lhs, const ComponentIterator& rhs) noexcept \
657  { \
658  VTK_ITER_ASSERT( \
659  lhs.GetArray() == rhs.GetArray(), "Mismatched arrays in iterator comparison."); \
660  VTK_ITER_ASSERT( \
661  lhs.GetTupleId() == rhs.GetTupleId(), "Mismatched tuple ids in iterator comparison."); \
662  VTK_ITER_ASSUME(lhs.GetNumComps().value > 0); \
663  VTK_ITER_ASSUME(lhs.GetNumComps().value == rhs.GetNumComps().value); \
664  return lhs.GetComponentId() OP rhs.GetComponentId(); \
665  }
666 
673 
674 #undef VTK_TMP_MAKE_OPERATOR
675 
678  {
679  this->Ref.ComponentId += offset;
680  VTK_ITER_ASSERT(this->Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
681  "Component iterator at invalid component id.");
682  return *this;
683  }
684 
686  const ComponentIterator& it, difference_type offset) noexcept
687  {
688  return ComponentIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId(),
689  it.GetComponentId() + offset };
690  }
691 
693  difference_type offset, const ComponentIterator& it) noexcept
694  {
695  return ComponentIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId(),
696  it.GetComponentId() + offset };
697  }
698 
701  {
702  this->Ref.ComponentId -= offset;
703  VTK_ITER_ASSERT(this->Ref.ComponentId >= 0 && this->Ref.ComponentId <= this->Ref.NumComps.value,
704  "Component iterator at invalid component id.");
705  return *this;
706  }
707 
709  const ComponentIterator& it, difference_type offset) noexcept
710  {
711  return ComponentIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId(),
712  it.GetComponentId() - offset };
713  }
714 
716  const ComponentIterator& it1, const ComponentIterator& it2) noexcept
717  {
718  VTK_ITER_ASSERT(it1.GetArray() == it2.GetArray(),
719  "Cannot do math with component iterators from different "
720  "arrays.");
721  VTK_ITER_ASSERT(it1.GetTupleId() == it2.GetTupleId(),
722  "Cannot do math with component iterators from different "
723  "tuples.");
724  return it1.GetComponentId() - it2.GetComponentId();
725  }
726 
727  friend VTK_ITER_INLINE void swap(ComponentIterator& lhs, ComponentIterator& rhs) noexcept
728  {
729  // Different arrays may use different iterator implementations.
731  lhs.GetArray() == rhs.GetArray(), "Cannot swap iterators from different arrays.");
732 
733  using std::swap;
734  swap(lhs.GetTupleId(), rhs.GetTupleId());
735  swap(lhs.GetComponentId(), rhs.GetComponentId());
736  }
737 
738  friend struct ConstComponentIterator<ArrayType, TupleSize>;
739 
740 protected:
741  // Needed for access from friend functions. We could just store the array
742  // and ID here instead of the ref, but meh.
743  ArrayType* GetArray() const noexcept { return this->Ref.Array; }
744  TupleIdType& GetTupleId() noexcept { return this->Ref.TupleId; }
745  const TupleIdType& GetTupleId() const noexcept { return this->Ref.TupleId; }
746  ComponentIdType& GetComponentId() noexcept { return this->Ref.ComponentId; }
747  const ComponentIdType& GetComponentId() const noexcept { return this->Ref.ComponentId; }
748  NumCompsType& GetNumComps() noexcept { return this->Ref.NumComps; }
749  const NumCompsType& GetNumComps() const noexcept { return this->Ref.NumComps; }
750 
751  ComponentReference<ArrayType, TupleSize> Ref;
752 };
753 
754 //------------------------------------------------------------------------------
755 // Const tuple reference
756 template <typename ArrayType, ComponentIdType TupleSize>
757 struct ConstTupleReference
758 {
759 private:
760  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
761  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
762 
763  using NumCompsType = GenericTupleSize<TupleSize>;
764  using APIType = GetAPIType<ArrayType>;
765 
766 public:
768  using value_type = APIType;
772 
775  : Array(nullptr)
776  , TupleId(0)
777  {
778  }
779 
781  ConstTupleReference(ArrayType* array, NumCompsType numComps, TupleIdType tupleId) noexcept
782  : Array(array)
783  , NumComps(numComps)
784  , TupleId(tupleId)
785  {
786  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
787  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
788  VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
789  "Const tuple reference at invalid tuple id.");
790  }
791 
794  : Array{ o.Array }
795  , NumComps{ o.NumComps }
796  , TupleId{ o.TupleId }
797  {
798  }
799 
801  ConstTupleReference(const ConstTupleReference&) noexcept = default;
803  ConstTupleReference(ConstTupleReference&&) noexcept = default;
804 
805  // Allow this type to masquerade as a pointer, so that tupleIiter->foo works.
807  ConstTupleReference* operator->() noexcept { return this; }
809  const ConstTupleReference* operator->() const noexcept { return this; }
810 
811  // Caller must ensure that there are size() elements in array.
813  void GetTuple(APIType* tuple) const noexcept
814  {
815  VTK_ITER_ASSUME(this->NumComps.value > 0);
816  VTK_ITER_ASSUME(this->Array->GetNumberOfComponents() == this->NumComps.value);
818  acc.Get(this->TupleId, tuple);
819  }
820 
821  // skips some runtime checks when both sizes are fixed:
822  template <typename OArrayType, ComponentIdType OSize>
824  const TupleReference<OArrayType, OSize>& other) const noexcept
825  {
826  // Check that types are convertible:
827  using OAPIType = GetAPIType<OArrayType>;
828  static_assert(
829  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
830 
831  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
832  static_assert(TupleSize == OSize, "Cannot compare tuples with different sizes.");
833 
834  return std::equal(this->cbegin(), this->cend(), other.cbegin());
835  }
836 
837  // Needs a runtime check:
838  template <typename OArrayType, ComponentIdType OSize>
840  const TupleReference<OArrayType, OSize>& other) const noexcept
841  {
842  // Check that types are convertible:
843  using OAPIType = GetAPIType<OArrayType>;
844  static_assert(
845  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
846 
848  other.size() == this->NumComps.value, "Cannot compare tuples with different sizes.");
849 
850  return std::equal(this->cbegin(), this->cend(), other.cbegin());
851  }
852 
853  // skips some runtime checks when both sizes are fixed:
854  template <typename OArrayType, ComponentIdType OSize>
856  const ConstTupleReference<OArrayType, OSize>& other) const noexcept
857  {
858  // Check that types are convertible:
859  using OAPIType = GetAPIType<OArrayType>;
860  static_assert(
861  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
862 
863  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
864  static_assert(TupleSize == OSize, "Cannot compare tuples with different sizes.");
865 
866  return std::equal(this->cbegin(), this->cend(), other.cbegin());
867  }
868 
869  // Needs a runtime check:
870  template <typename OArrayType, ComponentIdType OSize>
872  const ConstTupleReference<OArrayType, OSize>& other) const noexcept
873  {
874  // Check that types are convertible:
875  using OAPIType = GetAPIType<OArrayType>;
876  static_assert(
877  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
878 
880  other.size() == this->NumComps.value, "Cannot compare tuples with different sizes.");
881 
882  return std::equal(this->cbegin(), this->cend(), other.cbegin());
883  }
884 
885  template <typename OArrayType, ComponentIdType OSize>
887  {
888  return !(*this == o);
889  }
890 
891  template <typename OArrayT, ComponentIdType OSize>
893  {
894  return !(*this == o);
895  }
896 
899  {
900  return const_reference{ this->Array, this->NumComps, this->TupleId, i };
901  }
902 
904  size_type size() const noexcept { return this->NumComps.value; }
905 
907  const_iterator begin() const noexcept { return this->NewConstIterator(0); }
909  const_iterator end() const noexcept { return this->NewConstIterator(this->NumComps.value); }
910 
912  const_iterator cbegin() const noexcept { return this->NewConstIterator(0); }
914  const_iterator cend() const noexcept { return this->NewConstIterator(this->NumComps.value); }
915 
916  friend struct ConstTupleIterator<ArrayType, TupleSize>;
917 
918 protected:
919  // Intentionally hidden:
921  ConstTupleReference& operator=(const ConstTupleReference&) noexcept = default;
922 
925  {
926  VTK_ITER_ASSUME(this->NumComps.value > 0);
927  return const_iterator{ this->Array, this->NumComps, this->TupleId, comp };
928  }
929 
931  void CopyReference(const ConstTupleReference& o) noexcept
932  {
933  // Must use same array, other array types may use different implementations.
934  VTK_ITER_ASSERT(this->Array == o.Array, "Cannot copy reference objects between arrays.");
935  this->NumComps = o.NumComps;
936  this->TupleId = o.TupleId;
937  }
938 
939  mutable ArrayType* Array;
942 };
943 
944 //------------------------------------------------------------------------------
945 // Tuple reference
946 template <typename ArrayType, ComponentIdType TupleSize>
947 struct TupleReference
948 {
949 private:
950  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
951  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
952 
953  using NumCompsType = GenericTupleSize<TupleSize>;
954  using APIType = GetAPIType<ArrayType>;
955 
956 public:
958  using value_type = APIType;
963 
965  TupleReference() noexcept
966  : Array(nullptr)
967  , TupleId(0)
968  {
969  }
970 
972  TupleReference(ArrayType* array, NumCompsType numComps, TupleIdType tupleId) noexcept
973  : Array(array)
974  , NumComps(numComps)
975  , TupleId(tupleId)
976  {
977  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
978  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
979  VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
980  "Tuple reference at invalid tuple id.");
981  }
982 
984  TupleReference(const TupleReference&) = default;
986  TupleReference(TupleReference&&) = default;
987 
988  // Allow this type to masquerade as a pointer, so that tupleIiter->foo works.
990  TupleReference* operator->() noexcept { return this; }
992  const TupleReference* operator->() const noexcept { return this; }
993 
994  // Caller must ensure that there are size() elements in array.
996  void GetTuple(APIType* tuple) const noexcept
997  {
998  VTK_ITER_ASSUME(this->NumComps.value > 0);
999  VTK_ITER_ASSUME(this->Array->GetNumberOfComponents() == this->NumComps.value);
1001  acc.Get(this->TupleId, tuple);
1002  }
1003 
1004  // Caller must ensure that there are size() elements in array.
1006  void SetTuple(const APIType* tuple) noexcept
1007  {
1008  VTK_ITER_ASSUME(this->NumComps.value > 0);
1009  VTK_ITER_ASSUME(this->Array->GetNumberOfComponents() == this->NumComps.value);
1011  acc.Set(this->TupleId, tuple);
1012  }
1013 
1015  TupleReference& operator=(const TupleReference& other) noexcept
1016  {
1017  std::copy_n(other.cbegin(), this->NumComps.value, this->begin());
1018  return *this;
1019  }
1020 
1021  // skips some runtime checks when both sizes are fixed:
1022  template <typename OArrayType, ComponentIdType OSize>
1024  const TupleReference<OArrayType, OSize>& other) noexcept
1025  {
1026  // Check that types are convertible:
1027  using OAPIType = GetAPIType<OArrayType>;
1028  static_assert(
1029  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when assigning tuples.");
1030 
1031  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
1032  static_assert(TupleSize == OSize, "Cannot assign tuples with different sizes.");
1033 
1034  std::copy_n(other.cbegin(), OSize, this->begin());
1035  return *this;
1036  }
1037 
1038  // Needs a runtime check:
1039  template <typename OArrayType, ComponentIdType OSize>
1041  const TupleReference<OArrayType, OSize>& other) noexcept
1042  {
1043  // Check that types are convertible:
1044  using OAPIType = GetAPIType<OArrayType>;
1045  static_assert(
1046  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when assigning tuples.");
1047 
1049  other.size() == this->NumComps.value, "Cannot assign tuples with different sizes.");
1050 
1051  std::copy_n(other.cbegin(), this->NumComps.value, this->begin());
1052  return *this;
1053  }
1054 
1055  // skips some runtime checks when both sizes are fixed:
1056  template <typename OArrayType, ComponentIdType OSize>
1058  const ConstTupleReference<OArrayType, OSize>& other) noexcept
1059  {
1060  // Check that types are convertible:
1061  using OAPIType = GetAPIType<OArrayType>;
1062  static_assert(
1063  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when assigning tuples.");
1064 
1065  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
1066  static_assert(TupleSize == OSize, "Cannot assign tuples with different sizes.");
1067 
1068  std::copy_n(other.cbegin(), OSize, this->begin());
1069  return *this;
1070  }
1071 
1072  // Needs a runtime check:
1073  template <typename OArrayType, ComponentIdType OSize>
1075  const ConstTupleReference<OArrayType, OSize>& other) noexcept
1076  {
1077  // Check that types are convertible:
1078  using OAPIType = GetAPIType<OArrayType>;
1079  static_assert(
1080  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when assigning tuples.");
1081 
1083  other.size() == this->NumComps.value, "Cannot assign tuples with different sizes.");
1084 
1085  std::copy_n(other.cbegin(), this->NumComps.value, this->begin());
1086  return *this;
1087  }
1088 
1089  // skips some runtime checks when both sizes are fixed:
1090  template <typename OArrayType, ComponentIdType OSize>
1092  const TupleReference<OArrayType, OSize>& other) const noexcept
1093  {
1094  // Check that types are convertible:
1095  using OAPIType = GetAPIType<OArrayType>;
1096  static_assert(
1097  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
1098 
1099  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
1100  static_assert(TupleSize == OSize, "Cannot compare tuples with different sizes.");
1101 
1102  return std::equal(this->cbegin(), this->cend(), other.cbegin());
1103  }
1104 
1105  // Needs a runtime check:
1106  template <typename OArrayType, ComponentIdType OSize>
1108  const TupleReference<OArrayType, OSize>& other) const noexcept
1109  {
1110  // Check that types are convertible:
1111  using OAPIType = GetAPIType<OArrayType>;
1112  static_assert(
1113  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
1114 
1116  other.size() == this->NumComps.value, "Cannot compare tuples with different sizes.");
1117 
1118  return std::equal(this->cbegin(), this->cend(), other.cbegin());
1119  }
1120 
1121  // skips some runtime checks when both sizes are fixed:
1122  template <typename OArrayType, ComponentIdType OSize>
1124  const ConstTupleReference<OArrayType, OSize>& other) const noexcept
1125  {
1126  // Check that types are convertible:
1127  using OAPIType = GetAPIType<OArrayType>;
1128  static_assert(
1129  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
1130 
1131  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
1132  static_assert(TupleSize == OSize, "Cannot compare tuples with different sizes.");
1133 
1134  return std::equal(this->cbegin(), this->cend(), other.cbegin());
1135  }
1136 
1137  // Needs a runtime check:
1138  template <typename OArrayType, ComponentIdType OSize>
1140  const ConstTupleReference<OArrayType, OSize>& other) const noexcept
1141  {
1142  // Check that types are convertible:
1143  using OAPIType = GetAPIType<OArrayType>;
1144  static_assert(
1145  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when comparing tuples.");
1146 
1148  other.size() == this->NumComps.value, "Cannot compare tuples with different sizes.");
1149 
1150  return std::equal(this->cbegin(), this->cend(), other.cbegin());
1151  }
1152 
1153  template <typename OArrayType, ComponentIdType OSize>
1155  {
1156  return !(*this == o);
1157  }
1158 
1159  template <typename OArray, ComponentIdType OSize>
1161  {
1162  return !(*this == o);
1163  }
1164 
1165  // skips some runtime checks:
1166  template <typename OArrayType, ComponentIdType OSize>
1168  TupleReference<OArrayType, OSize> other) noexcept
1169  {
1170  // Check that types are convertible:
1171  using OAPIType = GetAPIType<OArrayType>;
1172  static_assert(
1173  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when swapping tuples.");
1174 
1175  // SFINAE guarantees that the tuple sizes are not dynamic in this overload:
1176  static_assert(TupleSize == OSize, "Cannot swap tuples with different sizes.");
1177 
1178  std::swap_ranges(this->begin(), this->end(), other.begin());
1179  }
1180 
1181  // Needs a runtime check:
1182  template <typename OArrayType, ComponentIdType OSize>
1184  TupleReference<OArrayType, OSize> other) noexcept
1185  {
1186  // Check that types are convertible:
1187  using OAPIType = GetAPIType<OArrayType>;
1188  static_assert(
1189  (std::is_convertible<OAPIType, APIType>{}), "Incompatible types when swapping tuples.");
1190 
1192  other.size() == this->NumComps.value, "Cannot swap tuples with different sizes.");
1193 
1194  std::swap_ranges(this->begin(), this->end(), other.begin());
1195  }
1196 
1197  friend VTK_ITER_INLINE void swap(TupleReference a, TupleReference b) noexcept { a.swap(b); }
1198 
1199  template <typename OArray, ComponentIdType OSize>
1201  {
1202  a.swap(b);
1203  }
1204 
1207  {
1208  return reference{ this->Array, this->NumComps, this->TupleId, i };
1209  }
1210 
1213  {
1214  // Let the reference type do the lookup during implicit conversion.
1215  return const_reference{ this->Array, this->NumComps, this->TupleId, i };
1216  }
1217 
1219  void fill(const value_type& v) noexcept { std::fill(this->begin(), this->end(), v); }
1220 
1222  size_type size() const noexcept { return this->NumComps.value; }
1223 
1225  iterator begin() noexcept { return this->NewIterator(0); }
1227  iterator end() noexcept { return this->NewIterator(this->NumComps.value); }
1228 
1230  const_iterator begin() const noexcept { return this->NewConstIterator(0); }
1232  const_iterator end() const noexcept { return this->NewConstIterator(this->NumComps.value); }
1233 
1235  const_iterator cbegin() const noexcept { return this->NewConstIterator(0); }
1237  const_iterator cend() const noexcept { return this->NewConstIterator(this->NumComps.value); }
1238 
1239  friend struct ConstTupleReference<ArrayType, TupleSize>;
1240  friend struct TupleIterator<ArrayType, TupleSize>;
1241 
1242 protected:
1244  iterator NewIterator(ComponentIdType comp) const noexcept
1245  {
1246  VTK_ITER_ASSUME(this->NumComps.value > 0);
1247  return iterator{ this->Array, this->NumComps, this->TupleId, comp };
1248  }
1249 
1252  {
1253  VTK_ITER_ASSUME(this->NumComps.value > 0);
1254  return const_iterator{ this->Array, this->NumComps, this->TupleId, comp };
1255  }
1256 
1258  void CopyReference(const TupleReference& o) noexcept
1259  {
1260  // Must use same array, other array types may use different implementations.
1261  VTK_ITER_ASSERT(this->Array == o.Array, "Cannot copy reference objects between arrays.");
1262  this->NumComps = o.NumComps;
1263  this->TupleId = o.TupleId;
1264  }
1265 
1266  mutable ArrayType* Array;
1269 };
1270 
1271 //------------------------------------------------------------------------------
1272 // Const tuple iterator
1273 template <typename ArrayType, ComponentIdType TupleSize>
1274 struct ConstTupleIterator
1275  : public std::iterator<std::random_access_iterator_tag, ConstTupleReference<ArrayType, TupleSize>,
1276  TupleIdType, ConstTupleReference<ArrayType, TupleSize>,
1277  ConstTupleReference<ArrayType, TupleSize> >
1278 {
1279 private:
1280  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
1281  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
1282 
1283  using NumCompsType = GenericTupleSize<TupleSize>;
1284  using Superclass = std::iterator<std::random_access_iterator_tag,
1287 
1288 public:
1289  using iterator_category = typename Superclass::iterator_category;
1290  using value_type = typename Superclass::value_type;
1291  using difference_type = typename Superclass::difference_type;
1292  using pointer = typename Superclass::pointer;
1294 
1296  ConstTupleIterator() noexcept = default;
1297 
1299  ConstTupleIterator(ArrayType* array, NumCompsType numComps, TupleIdType tupleId) noexcept
1300  : Ref(array, numComps, tupleId)
1301  {
1302  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
1303  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
1304  VTK_ITER_ASSERT(tupleId >= 0 && tupleId <= array->GetNumberOfTuples(),
1305  "Const tuple iterator at invalid tuple id.");
1306  }
1307 
1309  ConstTupleIterator(const TupleIterator<ArrayType, TupleSize>& o) noexcept : Ref{ o.Ref } {}
1310 
1312  ConstTupleIterator(const ConstTupleIterator& o) noexcept = default;
1315  {
1316  this->Ref.CopyReference(o.Ref);
1317  return *this;
1318  }
1319 
1321  ConstTupleIterator& operator++() noexcept // prefix
1322  {
1323  ++this->Ref.TupleId;
1325  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1326  "Const tuple iterator at invalid component id.");
1327  return *this;
1328  }
1329 
1331  ConstTupleIterator operator++(int) noexcept // postfix
1332  {
1333  return ConstTupleIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId++ };
1334  }
1335 
1337  ConstTupleIterator& operator--() noexcept // prefix
1338  {
1339  --this->Ref.TupleId;
1341  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1342  "Const tuple iterator at invalid component id.");
1343  return *this;
1344  }
1345 
1347  ConstTupleIterator operator--(int) noexcept // postfix
1348  {
1349  return ConstTupleIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId-- };
1350  }
1351 
1354  {
1355  return reference{ this->GetArray(), this->GetNumComps(), this->GetTupleId() + i };
1356  }
1357 
1359  reference operator*() noexcept { return this->Ref; }
1360 
1362  pointer operator->() noexcept { return this->Ref; }
1363 
1364 #define VTK_TMP_MAKE_OPERATOR(OP) \
1365  friend VTK_ITER_INLINE bool operator OP( \
1366  const ConstTupleIterator& lhs, const ConstTupleIterator& rhs) noexcept \
1367  { \
1368  VTK_ITER_ASSERT( \
1369  lhs.GetArray() == rhs.GetArray(), "Cannot compare iterators from different arrays."); \
1370  VTK_ITER_ASSUME(lhs.GetNumComps().value > 0); \
1371  VTK_ITER_ASSUME(lhs.GetNumComps().value == rhs.GetNumComps().value); \
1372  return lhs.GetTupleId() OP rhs.GetTupleId(); \
1373  }
1374 
1381 
1382 #undef VTK_TMP_MAKE_OPERATOR
1383 
1386  {
1387  this->Ref.TupleId += offset;
1389  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1390  "Const tuple iterator at invalid component id.");
1391  return *this;
1392  }
1393 
1395  const ConstTupleIterator& it, difference_type offset) noexcept
1396  {
1397  return ConstTupleIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId() + offset };
1398  }
1399 
1401  difference_type offset, const ConstTupleIterator& it) noexcept
1402  {
1403  return ConstTupleIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId() + offset };
1404  }
1405 
1408  {
1409  this->Ref.TupleId -= offset;
1411  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1412  "Const tuple iterator at invalid component id.");
1413  return *this;
1414  }
1415 
1417  const ConstTupleIterator& it, difference_type offset) noexcept
1418  {
1419  return ConstTupleIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId() - offset };
1420  }
1421 
1423  const ConstTupleIterator& it1, const ConstTupleIterator& it2) noexcept
1424  {
1425  VTK_ITER_ASSERT(it1.GetArray() == it2.GetArray(),
1426  "Cannot do math with tuple iterators from different "
1427  "arrays.");
1428  return it1.GetTupleId() - it2.GetTupleId();
1429  }
1430 
1432  {
1433  // Different arrays may use different iterator implementations.
1435  lhs.GetArray() == rhs.GetArray(), "Cannot swap iterators from different arrays.");
1436 
1437  using std::swap;
1438  swap(lhs.GetTupleId(), rhs.GetTupleId());
1439  }
1440 
1441 private:
1443  ArrayType* GetArray() const noexcept { return this->Ref.Array; }
1445  ArrayType*& GetArray() noexcept { return this->Ref.Array; }
1447  NumCompsType GetNumComps() const noexcept { return this->Ref.NumComps; }
1449  NumCompsType& GetNumComps() noexcept { return this->Ref.NumComps; }
1451  TupleIdType GetTupleId() const noexcept { return this->Ref.TupleId; }
1453  TupleIdType& GetTupleId() noexcept { return this->Ref.TupleId; }
1454 
1455  ConstTupleReference<ArrayType, TupleSize> Ref;
1456 };
1457 
1458 //------------------------------------------------------------------------------
1459 // Tuple iterator
1460 template <typename ArrayType, ComponentIdType TupleSize>
1461 struct TupleIterator
1462  : public std::iterator<std::random_access_iterator_tag, TupleReference<ArrayType, TupleSize>,
1463  TupleIdType, TupleReference<ArrayType, TupleSize>, TupleReference<ArrayType, TupleSize> >
1464 {
1465 private:
1466  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
1467  static_assert(IsVtkDataArray<ArrayType>::value, "Invalid array type.");
1468 
1469  using NumCompsType = GenericTupleSize<TupleSize>;
1470  using Superclass =
1471  std::iterator<std::random_access_iterator_tag, TupleReference<ArrayType, TupleSize>,
1472  TupleIdType, TupleReference<ArrayType, TupleSize>, TupleReference<ArrayType, TupleSize> >;
1473 
1474 public:
1475  using iterator_category = typename Superclass::iterator_category;
1476  using value_type = typename Superclass::value_type;
1477  using difference_type = typename Superclass::difference_type;
1478  using pointer = typename Superclass::pointer;
1480 
1482  TupleIterator() noexcept = default;
1483 
1485  TupleIterator(ArrayType* array, NumCompsType numComps, TupleIdType tupleId) noexcept
1486  : Ref(array, numComps, tupleId)
1487  {
1488  VTK_ITER_ASSERT(array != nullptr, "Invalid array.");
1489  VTK_ITER_ASSERT(numComps.value > 0, "Invalid number of components.");
1491  tupleId >= 0 && tupleId <= array->GetNumberOfTuples(), "Tuple iterator at invalid tuple id.");
1492  }
1493 
1495  TupleIterator(const TupleIterator& o) noexcept = default;
1496 
1499  {
1500  this->Ref.CopyReference(o.Ref);
1501  return *this;
1502  }
1503 
1505  TupleIterator& operator++() noexcept // prefix
1506  {
1507  ++this->Ref.TupleId;
1509  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1510  "Tuple iterator at invalid component id.");
1511  return *this;
1512  }
1513 
1515  TupleIterator operator++(int) noexcept // postfix
1516  {
1517  return TupleIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId++ };
1518  }
1519 
1521  TupleIterator& operator--() noexcept // prefix
1522  {
1523  --this->Ref.TupleId;
1525  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1526  "Tuple iterator at invalid component id.");
1527  return *this;
1528  }
1529 
1531  TupleIterator operator--(int) noexcept // postfix
1532  {
1533  return TupleIterator{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId-- };
1534  }
1535 
1538  {
1539  return reference{ this->Ref.Array, this->Ref.NumComps, this->Ref.TupleId + i };
1540  }
1541 
1543  reference operator*() noexcept { return this->Ref; }
1544 
1546  pointer& operator->() noexcept { return this->Ref; }
1547 
1548 #define VTK_TMP_MAKE_OPERATOR(OP) \
1549  friend VTK_ITER_INLINE bool operator OP(const TupleIterator& lhs, const TupleIterator& rhs) \
1550  noexcept \
1551  { \
1552  VTK_ITER_ASSERT( \
1553  lhs.GetArray() == rhs.GetArray(), "Cannot compare iterators from different arrays."); \
1554  VTK_ITER_ASSUME(lhs.GetNumComps().value > 0); \
1555  VTK_ITER_ASSUME(lhs.GetNumComps().value == rhs.GetNumComps().value); \
1556  return lhs.GetTupleId() OP rhs.GetTupleId(); \
1557  }
1558 
1565 
1566 #undef VTK_TMP_MAKE_OPERATOR
1567 
1570  {
1571  this->Ref.TupleId += offset;
1573  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1574  "Tuple iterator at invalid component id.");
1575  return *this;
1576  }
1577 
1579  const TupleIterator& it, difference_type offset) noexcept
1580  {
1581  return TupleIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId() + offset };
1582  }
1583 
1585  difference_type offset, const TupleIterator& it) noexcept
1586  {
1587  return TupleIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId() + offset };
1588  }
1589 
1592  {
1593  this->Ref.TupleId -= offset;
1595  this->Ref.TupleId >= 0 && this->Ref.TupleId <= this->Ref.Array->GetNumberOfTuples(),
1596  "Tuple iterator at invalid component id.");
1597  return *this;
1598  }
1599 
1601  const TupleIterator& it, difference_type offset) noexcept
1602  {
1603  return TupleIterator{ it.GetArray(), it.GetNumComps(), it.GetTupleId() - offset };
1604  }
1605 
1607  const TupleIterator& it1, const TupleIterator& it2) noexcept
1608  {
1609  VTK_ITER_ASSERT(it1.GetArray() == it2.GetArray(),
1610  "Cannot do math with tuple iterators from different "
1611  "arrays.");
1612  return it1.GetTupleId() - it2.GetTupleId();
1613  }
1614 
1615  friend VTK_ITER_INLINE void swap(TupleIterator& lhs, TupleIterator& rhs) noexcept
1616  {
1617  // Different arrays may use different iterator implementations.
1619  lhs.GetArray() == rhs.GetArray(), "Cannot swap iterators from different arrays.");
1620 
1621  using std::swap;
1622  swap(lhs.GetTupleId(), rhs.GetTupleId());
1623  }
1624 
1625  friend struct ConstTupleIterator<ArrayType, TupleSize>;
1626  friend struct ConstTupleReference<ArrayType, TupleSize>;
1627 
1628 protected:
1630  ArrayType* GetArray() const noexcept { return this->Ref.Array; }
1632  ArrayType*& GetArray() noexcept { return this->Ref.Array; }
1634  NumCompsType GetNumComps() const noexcept { return this->Ref.NumComps; }
1636  NumCompsType& GetNumComps() noexcept { return this->Ref.NumComps; }
1638  TupleIdType GetTupleId() const noexcept { return this->Ref.TupleId; }
1640  TupleIdType& GetTupleId() noexcept { return this->Ref.TupleId; }
1641 
1642  TupleReference<ArrayType, TupleSize> Ref;
1643 };
1644 
1645 //------------------------------------------------------------------------------
1646 // Tuple range
1647 template <typename ArrayTypeT, ComponentIdType TupleSize>
1648 struct TupleRange
1649 {
1650 private:
1651  using NumCompsType = GenericTupleSize<TupleSize>;
1652  static_assert(IsValidTupleSize<TupleSize>::value, "Invalid tuple size.");
1653  static_assert(IsVtkDataArray<ArrayTypeT>::value, "Invalid array type.");
1654 
1655 public:
1656  using ArrayType = ArrayTypeT;
1667 
1668  // May be DynamicTupleSize, or the actual tuple size.
1669  constexpr static ComponentIdType TupleSizeTag = TupleSize;
1670 
1676 
1678  TupleRange() noexcept = default;
1679 
1681  TupleRange(ArrayType* arr, TupleIdType beginTuple, TupleIdType endTuple) noexcept
1682  : Array(arr)
1683  , NumComps(arr)
1684  , BeginTuple(beginTuple)
1685  , EndTuple(endTuple)
1686  {
1687  assert(this->Array);
1688  assert(beginTuple >= 0 && beginTuple <= endTuple);
1689  assert(endTuple >= 0 && endTuple <= this->Array->GetNumberOfTuples());
1690  }
1691 
1693  TupleRange GetSubRange(TupleIdType beginTuple = 0, TupleIdType endTuple = -1) const noexcept
1694  {
1695  const TupleIdType realBegin = this->BeginTuple + beginTuple;
1696  const TupleIdType realEnd = endTuple >= 0 ? this->BeginTuple + endTuple : this->EndTuple;
1697 
1698  return TupleRange{ this->Array, realBegin, realEnd };
1699  }
1700 
1702  ArrayType* GetArray() const noexcept { return this->Array; }
1704  ComponentIdType GetTupleSize() const noexcept { return this->NumComps.value; }
1706  TupleIdType GetBeginTupleId() const noexcept { return this->BeginTuple; }
1708  TupleIdType GetEndTupleId() const noexcept { return this->EndTuple; }
1709 
1711  size_type size() const noexcept { return this->EndTuple - this->BeginTuple; }
1712 
1714  iterator begin() noexcept { return this->NewIter(this->BeginTuple); }
1716  iterator end() noexcept { return this->NewIter(this->EndTuple); }
1717 
1719  const_iterator begin() const noexcept { return this->NewCIter(this->BeginTuple); }
1721  const_iterator end() const noexcept { return this->NewCIter(this->EndTuple); }
1722 
1724  const_iterator cbegin() const noexcept { return this->NewCIter(this->BeginTuple); }
1726  const_iterator cend() const noexcept { return this->NewCIter(this->EndTuple); }
1727 
1730  {
1731  return reference{ this->Array, this->NumComps, this->BeginTuple + i };
1732  }
1733 
1736  {
1737  return const_reference{ this->Array, this->NumComps, this->BeginTuple + i };
1738  }
1739 
1740 private:
1742  iterator NewIter(TupleIdType t) const { return iterator{ this->Array, this->NumComps, t }; }
1743 
1745  const_iterator NewCIter(TupleIdType t) const
1746  {
1747  return const_iterator{ this->Array, this->NumComps, t };
1748  }
1749 
1750  mutable ArrayType* Array{ nullptr };
1751  NumCompsType NumComps{};
1752  TupleIdType BeginTuple{ 0 };
1753  TupleIdType EndTuple{ 0 };
1754 };
1755 
1756 // Unimplemented, only used inside decltype in SelectTupleRange:
1757 template <typename ArrayType, ComponentIdType TupleSize>
1758 TupleRange<ArrayType, TupleSize> DeclareTupleRangeSpecialization(vtkDataArray*);
1759 
1760 } // end namespace detail
1761 } // end namespace vtk
1762 
1764 
1765 #endif // __VTK_WRAP__
1766 #endif // vtkDataArrayTupleRange_Generic_h
1767 
1768 // VTK-HeaderTest-Exclude: vtkDataArrayTupleRange_Generic.h
vtk::detail::ConstComponentIterator::operator-=
VTK_ITER_INLINE ConstComponentIterator & operator-=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:519
VTK_ITER_ASSUME
#define VTK_ITER_ASSUME
Definition: vtkDataArrayMeta.h:53
vtk::detail::TupleIterator::operator-
friend VTK_ITER_INLINE TupleIterator operator-(const TupleIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1600
vtkDataArrayAccessor
Efficient templated access to vtkDataArray.
Definition: vtkDataArrayAccessor.h:107
vtk::detail::TupleReference::NewConstIterator
VTK_ITER_INLINE const_iterator NewConstIterator(ComponentIdType comp) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1251
vtk::detail::ConstTupleIterator::operator=
VTK_ITER_INLINE ConstTupleIterator & operator=(const ConstTupleIterator &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1314
vtk::detail::ConstTupleIterator
Definition: vtkDataArrayTupleRange_AOS.h:50
vtk::detail::ConstTupleIterator::ConstTupleIterator
VTK_ITER_INLINE ConstTupleIterator() noexcept=default
vtk::detail::TupleReference::GetTuple
VTK_ITER_INLINE void GetTuple(APIType *tuple) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:996
vtk::detail::TupleRange::TupleSizeTag
constexpr static ComponentIdType TupleSizeTag
Definition: vtkDataArrayTupleRange_Generic.h:1669
vtk::detail::TupleIterator::iterator_category
typename Superclass::iterator_category iterator_category
Definition: vtkDataArrayTupleRange_Generic.h:1475
vtk::detail::ConstTupleReference::ConstTupleReference
VTK_ITER_INLINE ConstTupleReference(ArrayType *array, NumCompsType numComps, TupleIdType tupleId) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:781
vtk::detail::TupleReference::TupleId
TupleIdType TupleId
Definition: vtkDataArrayTupleRange_Generic.h:1268
vtk::detail::ConstTupleIterator::operator*
VTK_ITER_INLINE reference operator*() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1359
vtk::detail::TupleRange::end
VTK_ITER_INLINE const_iterator end() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1721
vtk::detail::ConstTupleReference::cbegin
VTK_ITER_INLINE const_iterator cbegin() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:912
vtk::detail::EnableIfStaticTupleSizes
typename std::enable_if< AreStaticTupleSizes< S1, S2 >::value, T >::type EnableIfStaticTupleSizes
Definition: vtkDataArrayMeta.h:119
vtk::detail::ConstComponentIterator::operator[]
VTK_ITER_INLINE reference operator[](difference_type i) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:466
vtk::detail::TupleRange::GetBeginTupleId
VTK_ITER_INLINE TupleIdType GetBeginTupleId() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1706
vtk::detail::ComponentIterator::operator=
VTK_ITER_INLINE ComponentIterator & operator=(const ComponentIterator &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:603
vtk::detail::TupleIterator::operator-=
VTK_ITER_INLINE TupleIterator & operator-=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1591
vtk::detail::TupleRange::cbegin
VTK_ITER_INLINE const_iterator cbegin() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1724
vtk::detail::TupleRange::APIType
GetAPIType< ArrayType > APIType
Definition: vtkDataArrayTupleRange_Generic.h:1657
vtk::detail::IsVtkDataArray
Definition: vtkDataArrayMeta.h:82
vtk::detail::ComponentIterator::operator+
friend VTK_ITER_INLINE ComponentIterator operator+(const ComponentIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:685
vtk::detail::TupleIterator::pointer
typename Superclass::pointer pointer
Definition: vtkDataArrayTupleRange_Generic.h:1478
vtk::detail::TupleRange::end
VTK_ITER_INLINE iterator end() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1716
vtkX3D::value
Definition: vtkX3D.h:226
vtk::detail::ComponentReference::operator--
VTK_ITER_INLINE ComponentReference operator--() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:309
VTK_ITER_OPTIMIZE_START
#define VTK_ITER_OPTIMIZE_START
Definition: vtkDataArrayMeta.h:54
vtk::detail::ConstTupleIterator::operator-
friend VTK_ITER_INLINE ConstTupleIterator operator-(const ConstTupleIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1416
vtk::detail::ComponentIterator::operator--
VTK_ITER_INLINE ComponentIterator & operator--() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:626
vtk::detail::ComponentReference::ComponentReference
VTK_ITER_INLINE ComponentReference(ArrayType *array, NumCompsType numComps, TupleIdType tuple, ComponentIdType comp) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:176
vtk::detail::TupleRange::ArrayType
ArrayTypeT ArrayType
Definition: vtkDataArrayTupleRange_Generic.h:1656
vtk::detail::ConstTupleReference::size
VTK_ITER_INLINE size_type size() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:904
vtk::detail::TupleRange::const_iterator
ConstTupleIteratorType const_iterator
Definition: vtkDataArrayTupleRange_Generic.h:1673
vtk::detail::ConstTupleIterator::operator[]
VTK_ITER_INLINE reference operator[](difference_type i) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1353
vtk::detail::ConstComponentIterator::operator-
friend VTK_ITER_INLINE difference_type operator-(const ConstComponentIterator &it1, const ConstComponentIterator &it2) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:533
vtk::detail::ConstTupleIterator::operator+
friend VTK_ITER_INLINE ConstTupleIterator operator+(difference_type offset, const ConstTupleIterator &it) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1400
vtk::detail::ConstTupleReference::operator==
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:839
vtk::detail::ConstComponentIterator::value_type
typename Superclass::value_type value_type
Definition: vtkDataArrayTupleRange_Generic.h:390
vtk::detail::ComponentIterator::pointer
typename Superclass::pointer pointer
Definition: vtkDataArrayTupleRange_Generic.h:581
vtk::detail::ConstComponentIterator::iterator_category
typename Superclass::iterator_category iterator_category
Definition: vtkDataArrayTupleRange_Generic.h:389
vtk::detail::EnableIfEitherTupleSizeIsDynamic
typename std::enable_if< IsEitherTupleSizeDynamic< S1, S2 >::value, T >::type EnableIfEitherTupleSizeIsDynamic
Definition: vtkDataArrayMeta.h:131
vtk::detail::ConstComponentIterator
Definition: vtkDataArrayTupleRange_Generic.h:48
vtk::detail::ConstTupleReference::operator==
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:871
vtk::detail::ConstTupleReference::Array
ArrayType * Array
Definition: vtkDataArrayTupleRange_Generic.h:939
vtk::detail::ConstComponentReference
Definition: vtkDataArrayTupleRange_Generic.h:44
vtk::detail::TupleIterator::operator+
friend VTK_ITER_INLINE TupleIterator operator+(const TupleIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1578
vtk::detail::ComponentIterator::operator+
friend VTK_ITER_INLINE ComponentIterator operator+(difference_type offset, const ComponentIterator &it) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:692
vtk::detail::TupleReference::operator[]
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1212
vtk::detail::TupleRange::TupleRange
VTK_ITER_INLINE TupleRange() noexcept=default
vtk::detail::ComponentReference::swap
friend VTK_ITER_INLINE void swap(ComponentReference lhs, APIType &rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:278
vtk::detail::ConstComponentIterator::operator+=
VTK_ITER_INLINE ConstComponentIterator & operator+=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:498
vtk::detail::ConstTupleIterator::operator-
friend VTK_ITER_INLINE difference_type operator-(const ConstTupleIterator &it1, const ConstTupleIterator &it2) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1422
vtk::detail::ConstTupleReference::cend
VTK_ITER_INLINE const_iterator cend() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:914
detail
Definition: vtkGenericDataArrayLookupHelper.h:31
vtk::detail::ConstTupleIterator::operator--
VTK_ITER_INLINE ConstTupleIterator operator--(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1347
vtk::detail::TupleRange
Definition: vtkDataArrayTupleRange_AOS.h:54
vtk::detail::ConstComponentIterator::operator++
VTK_ITER_INLINE ConstComponentIterator & operator++() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:434
vtk::detail::TupleReference::operator->
VTK_ITER_INLINE TupleReference * operator->() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:990
vtk::detail::ConstTupleReference::begin
VTK_ITER_INLINE const_iterator begin() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:907
vtk::detail::ConstTupleReference::operator=
VTK_ITER_INLINE ConstTupleReference & operator=(const ConstTupleReference &) noexcept=default
vtk::detail::ComponentIterator::difference_type
typename Superclass::difference_type difference_type
Definition: vtkDataArrayTupleRange_Generic.h:580
vtk::ComponentIdType
int ComponentIdType
Definition: vtkDataArrayMeta.h:68
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtk::detail::TupleReference::value_type
APIType value_type
Definition: vtkDataArrayTupleRange_Generic.h:958
vtk::detail::ConstTupleIterator::pointer
typename Superclass::pointer pointer
Definition: vtkDataArrayTupleRange_Generic.h:1292
vtk::detail::ConstComponentIterator::operator*
VTK_ITER_INLINE reference operator*() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:472
vtk::detail::ComponentReference::operator--
VTK_ITER_INLINE APIType operator--(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:317
vtk::detail::ConstTupleReference::operator->
const VTK_ITER_INLINE ConstTupleReference * operator->() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:809
vtk::GetAPIType
typename detail::GetAPITypeImpl< ArrayType >::APIType GetAPIType
Definition: vtkDataArrayMeta.h:185
vtk::detail::TupleIterator::GetTupleId
VTK_ITER_INLINE TupleIdType GetTupleId() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1638
vtk::detail::ConstComponentIterator::operator-
friend VTK_ITER_INLINE ConstComponentIterator operator-(const ConstComponentIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:527
vtk::detail::ConstComponentReference::ConstComponentReference
VTK_ITER_INLINE ConstComponentReference() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:76
vtk::detail::ConstTupleReference::size_type
ComponentIdType size_type
Definition: vtkDataArrayTupleRange_Generic.h:767
vtkDataArrayAccessor.h
vtk::detail::ComponentReference::NumComps
NumCompsType NumComps
Definition: vtkDataArrayTupleRange_Generic.h:367
vtk::detail::ConstTupleReference::NewConstIterator
VTK_ITER_INLINE const_iterator NewConstIterator(ComponentIdType comp) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:924
vtk::detail::ConstComponentReference::ComponentId
ComponentIdType ComponentId
Definition: vtkDataArrayTupleRange_Generic.h:150
vtk::detail::TupleIterator::operator--
VTK_ITER_INLINE TupleIterator & operator--() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1521
vtk::detail::TupleIterator::GetNumComps
VTK_ITER_INLINE NumCompsType GetNumComps() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1634
vtk::detail::TupleRange::operator[]
VTK_ITER_INLINE reference operator[](size_type i) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1729
vtk::detail::ConstComponentIterator::operator+
friend VTK_ITER_INLINE ConstComponentIterator operator+(const ConstComponentIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:506
vtk::detail::ConstComponentIterator::swap
friend VTK_ITER_INLINE void swap(ConstComponentIterator &lhs, ConstComponentIterator &rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:543
vtk::detail::ComponentReference::operator++
VTK_ITER_INLINE APIType operator++(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:301
vtk::detail::TupleIterator::Ref
TupleReference< ArrayType, TupleSize > Ref
Definition: vtkDataArrayTupleRange_Generic.h:1642
vtk::detail::TupleRange::TupleIteratorType
TupleIterator< ArrayType, TupleSize > TupleIteratorType
Definition: vtkDataArrayTupleRange_Generic.h:1658
vtk::detail::ConstComponentIterator::ConstComponentIterator
VTK_ITER_INLINE ConstComponentIterator(const ComponentIterator< ArrayType, TupleSize > &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:420
vtk::detail::TupleIterator::GetNumComps
VTK_ITER_INLINE NumCompsType & GetNumComps() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1636
vtk::detail::ComponentReference::TupleId
TupleIdType TupleId
Definition: vtkDataArrayTupleRange_Generic.h:368
vtk::detail::TupleIterator::TupleIterator
VTK_ITER_INLINE TupleIterator() noexcept=default
vtk::detail::ComponentReference::operator++
VTK_ITER_INLINE ComponentReference operator++() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:293
vtk::detail::ConstComponentIterator::ConstComponentIterator
VTK_ITER_INLINE ConstComponentIterator(ArrayType *array, NumCompsType numComps, TupleIdType tupleId, ComponentIdType comp) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:404
vtk::detail::ComponentIterator::GetTupleId
TupleIdType & GetTupleId() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:744
vtk::detail::TupleReference::operator=
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, TupleReference & > operator=(const TupleReference< OArrayType, OSize > &other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1040
vtk::detail::TupleIterator
Definition: vtkDataArrayTupleRange_AOS.h:52
vtk::detail::TupleIterator::operator++
VTK_ITER_INLINE TupleIterator operator++(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1515
vtk::detail::ConstTupleReference
Definition: vtkDataArrayTupleRange_AOS.h:46
vtk::detail::ComponentIterator::operator-
friend VTK_ITER_INLINE ComponentIterator operator-(const ComponentIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:708
vtk::detail::ConstComponentIterator::pointer
typename Superclass::pointer pointer
Definition: vtkDataArrayTupleRange_Generic.h:392
vtk::detail::ConstComponentReference::ConstComponentReference
VTK_ITER_INLINE ConstComponentReference(const ComponentReference< ArrayType, TupleSize > &o)
Definition: vtkDataArrayTupleRange_Generic.h:101
vtk::detail::TupleReference::operator->
const VTK_ITER_INLINE TupleReference * operator->() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:992
vtk::detail::ComponentReference::ComponentReference
VTK_ITER_INLINE ComponentReference() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:167
vtk::detail::ConstTupleReference::GetTuple
VTK_ITER_INLINE void GetTuple(APIType *tuple) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:813
vtk::detail::TupleReference::swap
friend VTK_ITER_INLINE void swap(TupleReference a, TupleReference< OArray, OSize > b) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1200
vtk::detail::ComponentIterator
Definition: vtkDataArrayTupleRange_Generic.h:50
vtk::detail::TupleReference::size_type
ComponentIdType size_type
Definition: vtkDataArrayTupleRange_Generic.h:957
vtk::detail::ConstTupleReference::value_type
APIType value_type
Definition: vtkDataArrayTupleRange_Generic.h:768
vtk::detail::TupleReference::operator[]
VTK_ITER_INLINE reference operator[](size_type i) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1206
vtk::detail::ConstTupleReference::operator==
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:823
vtk::detail::TupleRange::begin
VTK_ITER_INLINE const_iterator begin() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1719
vtk::detail::ConstComponentIterator::difference_type
typename Superclass::difference_type difference_type
Definition: vtkDataArrayTupleRange_Generic.h:391
vtkX3D::offset
Definition: vtkX3D.h:444
vtk::detail::ConstComponentReference::operator=
VTK_ITER_INLINE ConstComponentReference & operator=(const ConstComponentReference &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:116
vtk::detail::TupleRange::begin
VTK_ITER_INLINE iterator begin() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1714
vtk::detail::TupleReference::operator=
VTK_ITER_INLINE TupleReference & operator=(const TupleReference &other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1015
vtk::detail::ConstTupleIterator::operator++
VTK_ITER_INLINE ConstTupleIterator operator++(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1331
VTK_TMP_MAKE_OPERATOR
#define VTK_TMP_MAKE_OPERATOR(OP)
Definition: vtkDataArrayTupleRange_Generic.h:1548
vtk::detail::TupleReference
Definition: vtkDataArrayTupleRange_AOS.h:48
vtk::detail::ComponentIterator::operator[]
VTK_ITER_INLINE reference operator[](difference_type i) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:642
vtk::detail::TupleReference::TupleReference
VTK_ITER_INLINE TupleReference(ArrayType *array, NumCompsType numComps, TupleIdType tupleId) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:972
vtk::detail::TupleRange::cend
VTK_ITER_INLINE const_iterator cend() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1726
vtk::detail::TupleIterator::operator[]
VTK_ITER_INLINE reference operator[](difference_type i) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1537
vtk::detail::TupleRange::ComponentType
APIType ComponentType
Definition: vtkDataArrayTupleRange_Generic.h:1666
VTK_REF_OP_OVERLOADS
#define VTK_REF_OP_OVERLOADS(Op, ImplOp)
Definition: vtkDataArrayTupleRange_Generic.h:324
vtk::detail::ConstTupleReference::operator[]
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:898
vtk::detail::ConstComponentReference::ConstComponentReference
VTK_ITER_INLINE ConstComponentReference(ArrayType *array, NumCompsType numComps, TupleIdType tuple, ComponentIdType comp) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:85
vtk::detail::ComponentIterator::GetComponentId
const ComponentIdType & GetComponentId() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:747
vtk::detail::TupleReference::Array
ArrayType * Array
Definition: vtkDataArrayTupleRange_Generic.h:1266
vtkAssume.h
vtk::detail::ConstTupleReference::ConstTupleReference
VTK_ITER_INLINE ConstTupleReference(const TupleReference< ArrayType, TupleSize > &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:793
vtk::detail::ComponentIterator::GetTupleId
const TupleIdType & GetTupleId() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:745
vtk::detail::ComponentIterator::GetNumComps
const NumCompsType & GetNumComps() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:749
VTK_ITER_OPTIMIZE_END
#define VTK_ITER_OPTIMIZE_END
Definition: vtkDataArrayMeta.h:55
vtkX3D::reference
Definition: vtkX3D.h:470
vtk::detail::TupleRange::GetArray
VTK_ITER_INLINE ArrayType * GetArray() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1702
vtk::detail::ConstComponentReference::TupleId
TupleIdType TupleId
Definition: vtkDataArrayTupleRange_Generic.h:149
vtk::detail::ConstTupleIterator::operator+
friend VTK_ITER_INLINE ConstTupleIterator operator+(const ConstTupleIterator &it, difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1394
vtk::detail::ComponentIterator::ComponentIterator
VTK_ITER_INLINE ComponentIterator() noexcept=default
vtk::detail::ConstTupleReference::NumComps
NumCompsType NumComps
Definition: vtkDataArrayTupleRange_Generic.h:940
vtk::detail::TupleRange::size_type
TupleIdType size_type
Definition: vtkDataArrayTupleRange_Generic.h:1671
vtk::detail::TupleReference::SetTuple
VTK_ITER_INLINE void SetTuple(const APIType *tuple) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1006
vtk::detail::ConstTupleIterator::operator--
VTK_ITER_INLINE ConstTupleIterator & operator--() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1337
vtk::detail::ConstTupleIterator::operator->
VTK_ITER_INLINE pointer operator->() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1362
vtk::detail::TupleReference::operator==
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1107
vtk::detail::ConstComponentReference::NumComps
NumCompsType NumComps
Definition: vtkDataArrayTupleRange_Generic.h:148
vtk::detail::ComponentReference::ComponentId
ComponentIdType ComponentId
Definition: vtkDataArrayTupleRange_Generic.h:369
vtk::detail::TupleRange::operator[]
VTK_ITER_INLINE const_reference operator[](size_type i) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1735
vtk::detail::ComponentIterator::operator+=
VTK_ITER_INLINE ComponentIterator & operator+=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:677
vtk::detail::ComponentIterator::operator++
VTK_ITER_INLINE ComponentIterator operator++(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:619
vtk::detail::ConstTupleIterator::operator+=
VTK_ITER_INLINE ConstTupleIterator & operator+=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1385
vtk::detail::ComponentReference::swap
friend VTK_ITER_INLINE void swap(APIType &lhs, ComponentReference rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:285
vtk::detail::ConstTupleReference::end
VTK_ITER_INLINE const_iterator end() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:909
vtk::detail::DeclareTupleRangeSpecialization
TupleRange< AOSArrayType, TupleSize > DeclareTupleRangeSpecialization(ArrayType *)
vtk::detail::TupleIterator::operator*
VTK_ITER_INLINE reference operator*() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1543
vtk::detail::ComponentIterator::value_type
typename Superclass::value_type value_type
Definition: vtkDataArrayTupleRange_Generic.h:579
vtk::detail::TupleReference::fill
VTK_ITER_INLINE void fill(const value_type &v) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1219
vtk::detail::ConstTupleIterator::value_type
typename Superclass::value_type value_type
Definition: vtkDataArrayTupleRange_Generic.h:1290
vtk::detail::ComponentReference::operator=
VTK_ITER_INLINE ComponentReference operator=(const ComponentReference< OArray, OSize > &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:233
vtk::detail::TupleReference::end
VTK_ITER_INLINE const_iterator end() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1232
vtk::detail::ComponentIterator::operator->
const VTK_ITER_INLINE pointer & operator->() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:652
vtk::detail::TupleReference::end
VTK_ITER_INLINE iterator end() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1227
vtk::detail::ConstComponentIterator::operator+
friend VTK_ITER_INLINE ConstComponentIterator operator+(difference_type offset, const ConstComponentIterator &it) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:512
vtk::detail::ComponentReference::operator=
VTK_ITER_INLINE ComponentReference operator=(ComponentReference &&o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:215
vtk::detail::ConstTupleReference::operator!=
VTK_ITER_INLINE bool operator!=(const TupleReference< OArrayType, OSize > &o) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:886
vtk::detail::ConstTupleIterator::operator-=
VTK_ITER_INLINE ConstTupleIterator & operator-=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1407
vtk::detail::TupleReference::begin
VTK_ITER_INLINE iterator begin() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1225
vtk::detail::ComponentIterator::iterator_category
typename Superclass::iterator_category iterator_category
Definition: vtkDataArrayTupleRange_Generic.h:578
vtk::detail::ComponentIterator::GetComponentId
ComponentIdType & GetComponentId() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:746
vtk::detail::ConstComponentIterator::operator--
VTK_ITER_INLINE ConstComponentIterator & operator--() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:450
vtk::detail::TupleRange::GetTupleSize
VTK_ITER_INLINE ComponentIdType GetTupleSize() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1704
vtk::detail::ComponentReference::swap
friend VTK_ITER_INLINE void swap(ComponentReference lhs, ComponentReference rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:258
vtk::detail::TupleIterator::operator+
friend VTK_ITER_INLINE TupleIterator operator+(difference_type offset, const TupleIterator &it) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1584
vtk::detail::TupleRange::GetSubRange
VTK_ITER_INLINE TupleRange GetSubRange(TupleIdType beginTuple=0, TupleIdType endTuple=-1) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1693
vtk::detail::TupleReference::cend
VTK_ITER_INLINE const_iterator cend() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1237
vtk::detail::ComponentReference::operator=
VTK_ITER_INLINE ComponentReference operator=(APIType val) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:249
vtk::detail::ConstComponentIterator::operator++
VTK_ITER_INLINE ConstComponentIterator operator++(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:443
vtk::detail::TupleReference::operator==
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1123
vtk::detail::ConstTupleReference::operator==
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:855
vtk::TupleIdType
vtkIdType TupleIdType
Definition: vtkDataArrayMeta.h:69
vtk::detail::ComponentIterator::GetArray
ArrayType * GetArray() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:743
vtk::detail::ConstComponentIterator::reference
typename Superclass::reference reference
Definition: vtkDataArrayTupleRange_Generic.h:393
vtk::detail::ComponentReference::Array
ArrayType * Array
Definition: vtkDataArrayTupleRange_Generic.h:366
vtk::detail::TupleReference::NumComps
NumCompsType NumComps
Definition: vtkDataArrayTupleRange_Generic.h:1267
vtk::detail::ComponentReference
Definition: vtkDataArrayTupleRange_Generic.h:46
vtk::detail::ComponentIterator::operator*
VTK_ITER_INLINE reference operator*() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:649
vtk::detail::TupleReference::operator=
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, TupleReference & > operator=(const ConstTupleReference< OArrayType, OSize > &other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1074
vtk::detail::TupleIterator::swap
friend VTK_ITER_INLINE void swap(TupleIterator &lhs, TupleIterator &rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1615
vtk::detail::ComponentIterator::GetNumComps
NumCompsType & GetNumComps() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:748
vtk::detail::TupleIterator::reference
typename Superclass::reference reference
Definition: vtkDataArrayTupleRange_Generic.h:1479
vtk
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
Definition: vtkAtomicTypeConcepts.h:21
vtk::detail::ConstComponentReference::operator=
VTK_ITER_INLINE ConstComponentReference & operator=(ConstComponentReference &&o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:127
vtk::detail::TupleRange::iterator
TupleIteratorType iterator
Definition: vtkDataArrayTupleRange_Generic.h:1672
vtk::detail::TupleRange::ConstTupleIteratorType
ConstTupleIterator< ArrayType, TupleSize > ConstTupleIteratorType
Definition: vtkDataArrayTupleRange_Generic.h:1659
vtk::detail::ConstComponentIterator::ConstComponentIterator
VTK_ITER_INLINE ConstComponentIterator() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:396
vtk::detail::IsValidTupleSize
Definition: vtkDataArrayMeta.h:92
vtk::detail::TupleReference::TupleReference
VTK_ITER_INLINE TupleReference() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:965
vtk::detail::TupleIterator::difference_type
typename Superclass::difference_type difference_type
Definition: vtkDataArrayTupleRange_Generic.h:1477
vtk::detail::ConstComponentIterator::operator=
VTK_ITER_INLINE ConstComponentIterator & operator=(const ConstComponentIterator &o) noexcept=default
VTK_ITER_ASSERT
#define VTK_ITER_ASSERT(x, msg)
Definition: vtkDataArrayMeta.h:43
vtk::detail::TupleIterator::operator++
VTK_ITER_INLINE TupleIterator & operator++() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1505
vtk::detail::ComponentIterator::operator-=
VTK_ITER_INLINE ComponentIterator & operator-=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:700
vtk::detail::ComponentIterator::swap
friend VTK_ITER_INLINE void swap(ComponentIterator &lhs, ComponentIterator &rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:727
vtk::detail::ConstTupleIterator::iterator_category
typename Superclass::iterator_category iterator_category
Definition: vtkDataArrayTupleRange_Generic.h:1289
vtk::detail::TupleIterator::operator->
VTK_ITER_INLINE pointer & operator->() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1546
vtk::detail::TupleReference::NewIterator
VTK_ITER_INLINE iterator NewIterator(ComponentIdType comp) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1244
vtk::detail::TupleReference::swap
friend VTK_ITER_INLINE void swap(TupleReference a, TupleReference b) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1197
vtk::detail::TupleReference::operator==
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, bool > operator==(const TupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1091
vtk::detail::TupleIterator::GetArray
VTK_ITER_INLINE ArrayType *& GetArray() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1632
vtk::detail::TupleRange::TupleReferenceType
TupleReference< ArrayType, TupleSize > TupleReferenceType
Definition: vtkDataArrayTupleRange_Generic.h:1660
vtkDataArrayMeta.h
vtk::detail::ComponentReference::CopyReference
VTK_ITER_INLINE void CopyReference(const ComponentReference &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:358
vtk::detail::TupleReference::operator!=
VTK_ITER_INLINE bool operator!=(const TupleReference< OArrayType, OSize > &o) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1154
vtk::detail::ComponentIterator::Ref
ComponentReference< ArrayType, TupleSize > Ref
Definition: vtkDataArrayTupleRange_Generic.h:751
VTK_ITER_INLINE
#define VTK_ITER_INLINE
Definition: vtkDataArrayMeta.h:52
vtk::detail::TupleIterator::value_type
typename Superclass::value_type value_type
Definition: vtkDataArrayTupleRange_Generic.h:1476
vtk::detail::ConstTupleReference::operator!=
VTK_ITER_INLINE bool operator!=(const ConstTupleReference< OArrayT, OSize > &o) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:892
vtk::detail::TupleIterator::operator--
VTK_ITER_INLINE TupleIterator operator--(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1531
vtk::detail::ConstTupleIterator::operator++
VTK_ITER_INLINE ConstTupleIterator & operator++() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1321
vtk::detail::ConstComponentIterator::operator--
VTK_ITER_INLINE ConstComponentIterator operator--(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:459
vtk::detail::ComponentReference::swap
friend VTK_ITER_INLINE void swap(ComponentReference lhs, ComponentReference< OArray, OSize > rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:266
vtk::detail::TupleIterator::operator=
VTK_ITER_INLINE TupleIterator & operator=(const TupleIterator &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1498
vtk::detail::ComponentIterator::reference
typename Superclass::reference reference
Definition: vtkDataArrayTupleRange_Generic.h:582
vtk::detail::GenericTupleSize
Definition: vtkDataArrayMeta.h:137
vtk::detail::ConstTupleIterator::difference_type
typename Superclass::difference_type difference_type
Definition: vtkDataArrayTupleRange_Generic.h:1291
vtk::detail::TupleReference::CopyReference
VTK_ITER_INLINE void CopyReference(const TupleReference &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1258
vtk::detail::TupleIterator::operator-
friend VTK_ITER_INLINE difference_type operator-(const TupleIterator &it1, const TupleIterator &it2) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1606
vtk::detail::TupleReference::operator==
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, bool > operator==(const ConstTupleReference< OArrayType, OSize > &other) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1139
vtk::detail::TupleIterator::operator+=
VTK_ITER_INLINE TupleIterator & operator+=(difference_type offset) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1569
vtk::detail::TupleRange::ConstTupleReferenceType
ConstTupleReference< ArrayType, TupleSize > ConstTupleReferenceType
Definition: vtkDataArrayTupleRange_Generic.h:1661
vtk::detail::TupleRange::size
VTK_ITER_INLINE size_type size() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1711
vtk::detail::ComponentIterator::operator--
VTK_ITER_INLINE ComponentIterator operator--(int) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:635
vtk::detail::ConstTupleIterator::ConstTupleIterator
VTK_ITER_INLINE ConstTupleIterator(const TupleIterator< ArrayType, TupleSize > &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1309
vtk::detail::ConstTupleReference::TupleId
TupleIdType TupleId
Definition: vtkDataArrayTupleRange_Generic.h:941
vtk::detail::ConstTupleReference::ConstTupleReference
VTK_ITER_INLINE ConstTupleReference() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:774
vtk::detail::ConstComponentReference::Array
ArrayType * Array
Definition: vtkDataArrayTupleRange_Generic.h:147
vtk::detail::TupleReference::operator=
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, TupleReference & > operator=(const ConstTupleReference< OArrayType, OSize > &other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1057
vtk::detail::TupleReference::swap
VTK_ITER_INLINE EnableIfEitherTupleSizeIsDynamic< TupleSize, OSize, void > swap(TupleReference< OArrayType, OSize > other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1183
vtk::detail::TupleIterator::GetTupleId
VTK_ITER_INLINE TupleIdType & GetTupleId() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1640
vtk::detail::TupleRange::GetEndTupleId
VTK_ITER_INLINE TupleIdType GetEndTupleId() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1708
vtk::detail::TupleReference::swap
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, void > swap(TupleReference< OArrayType, OSize > other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1167
vtk::detail::TupleReference::size
VTK_ITER_INLINE size_type size() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1222
vtk::detail::ComponentReference::operator=
VTK_ITER_INLINE ComponentReference operator=(const ComponentReference &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:197
vtk::detail::ConstTupleIterator::reference
typename Superclass::reference reference
Definition: vtkDataArrayTupleRange_Generic.h:1293
vtk::detail::ComponentIterator::operator-
friend VTK_ITER_INLINE difference_type operator-(const ComponentIterator &it1, const ComponentIterator &it2) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:715
vtk::detail::ConstTupleReference::CopyReference
VTK_ITER_INLINE void CopyReference(const ConstTupleReference &o) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:931
vtk::detail::TupleReference::cbegin
VTK_ITER_INLINE const_iterator cbegin() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1235
vtk::detail::TupleIterator::GetArray
VTK_ITER_INLINE ArrayType * GetArray() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1630
vtk::detail::TupleReference::operator=
VTK_ITER_INLINE EnableIfStaticTupleSizes< TupleSize, OSize, TupleReference & > operator=(const TupleReference< OArrayType, OSize > &other) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1023
vtk::detail::TupleReference::begin
VTK_ITER_INLINE const_iterator begin() const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1230
vtk::detail::ConstTupleIterator::swap
friend VTK_ITER_INLINE void swap(ConstTupleIterator &lhs, ConstTupleIterator &rhs) noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1431
vtk::detail::TupleReference::operator!=
VTK_ITER_INLINE bool operator!=(const ConstTupleReference< OArray, OSize > &o) const noexcept
Definition: vtkDataArrayTupleRange_Generic.h:1160
vtk::detail::ComponentIterator::operator++
VTK_ITER_INLINE ComponentIterator & operator++() noexcept
Definition: vtkDataArrayTupleRange_Generic.h:610