Go to the documentation of this file.
85 #ifndef vtkDataArrayIteratorMacro_h
86 #define vtkDataArrayIteratorMacro_h
89 #include "vtkSetGet.h"
96 #define _vtkDAIMUnused __attribute__ ((unused))
98 #define _vtkDAIMUnused
101 #define vtkDataArrayIteratorMacro(_array, _call) \
103 vtkAbstractArray *_aa(_array); \
104 if (vtkAOSDataArrayTemplate<VTK_TT> *_dat = \
105 vtkAOSDataArrayTemplate<VTK_TT>::FastDownCast(_aa)) \
107 typedef VTK_TT vtkDAValueType; \
108 typedef vtkAOSDataArrayTemplate<vtkDAValueType> vtkDAContainerType; \
109 typedef vtkDAContainerType::Iterator vtkDAIteratorType; \
110 vtkDAIteratorType vtkDABegin(_dat->Begin()); \
111 vtkDAIteratorType vtkDAEnd(_dat->End()); \
116 else if (vtkTypedDataArray<VTK_TT> *_tda = \
117 vtkTypedDataArray<VTK_TT>::FastDownCast(_aa)) \
119 typedef VTK_TT vtkDAValueType; \
120 typedef vtkTypedDataArray<vtkDAValueType> vtkDAContainerType; \
121 typedef vtkDAContainerType::Iterator vtkDAIteratorType; \
122 vtkDAIteratorType vtkDABegin(_tda->Begin()); \
123 vtkDAIteratorType vtkDAEnd(_tda->End()); \
132 typedef VTK_TT vtkDAValueType; \
133 typedef vtkAbstractArray vtkDAContainerType _vtkDAIMUnused; \
134 typedef vtkDAValueType* vtkDAIteratorType; \
135 vtkDAIteratorType vtkDABegin = \
136 static_cast<vtkDAIteratorType>(_aa->GetVoidPointer(0)); \
137 vtkDAIteratorType vtkDAEnd = vtkDABegin + _aa->GetMaxId() + 1; \
144 #endif //vtkDataArrayIteratorMacro_h