VTK  9.3.0
vtkIndexedImplicitBackend.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Funded by CEA, DAM, DIF, F-91297 Arpajon, France
4 #ifndef vtkIndexedImplicitBackend_h
5 #define vtkIndexedImplicitBackend_h
6 
45 #include "vtkCommonCoreModule.h"
46 
47 #include <memory>
48 
49 VTK_ABI_NAMESPACE_BEGIN
50 class vtkDataArray;
51 class vtkIdList;
52 template <typename ValueType>
53 class VTKCOMMONCORE_EXPORT vtkIndexedImplicitBackend final
54 {
55 public:
57 
66 
71  ValueType operator()(int idx) const;
72 
73 private:
74  struct Internals;
75  std::unique_ptr<Internals> Internal;
76 };
77 VTK_ABI_NAMESPACE_END
78 
79 #endif // vtkIndexedImplicitBackend_h
80 
81 #ifdef VTK_INDEXED_BACKEND_INSTANTIATING
82 #define VTK_INSTANTIATE_INDEXED_BACKEND(ValueType) \
83  VTK_ABI_NAMESPACE_BEGIN \
84  template class VTKCOMMONCORE_EXPORT vtkIndexedImplicitBackend<ValueType>; \
85  VTK_ABI_NAMESPACE_END
86 #endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
list of point or cell ids
Definition: vtkIdList.h:32
A backend for the vtkImplicitArray framework allowing one to use a subset of a given data array,...
vtkIndexedImplicitBackend(vtkDataArray *indexes, vtkDataArray *array)
Constructor.
ValueType operator()(int idx) const
Indexing operation for the indexed array respecting the backend expectations of vtkImplicitArray
vtkIndexedImplicitBackend(vtkIdList *indexes, vtkDataArray *array)
Constructor.