VTK: Common/Core/vtkIndexedImplicitBackend.h Source File

| VTK 9.3.1

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
62 vtkIndexedImplicitBackend(vtkIdList* indexes, vtkDataArray* array);
63 vtkIndexedImplicitBackend(vtkDataArray* indexes, vtkDataArray* array);
65 ~vtkIndexedImplicitBackend();
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 #if defined(VTK_INDEXED_BACKEND_INSTANTIATING)
82
83 #define VTK_INSTANTIATE_INDEXED_BACKEND(ValueType) \
84 VTK_ABI_NAMESPACE_BEGIN \
85 template class VTKCOMMONCORE_EXPORT vtkIndexedImplicitBackend<ValueType>; \
86 VTK_ABI_NAMESPACE_END
87
88 #elif defined(VTK_USE_EXTERN_TEMPLATE)
89
90 #ifndef VTK_INDEXED_BACKEND_TEMPLATE_EXTERN
91 #define VTK_INDEXED_BACKEND_TEMPLATE_EXTERN
92 #ifdef _MSC_VER
93 #pragma warning(push)
94 #pragma warning(disable : 4910) // extern and dllexport incompatible
95 #endif
96 VTK_ABI_NAMESPACE_BEGIN
97 vtkExternTemplateMacro(extern template class VTKCOMMONCORE_EXPORT vtkIndexedImplicitBackend);
98 VTK_ABI_NAMESPACE_END
99 #ifdef _MSC_VER
100 #pragma warning(pop)
101 #endif
102 #endif // VTK_INDEXED_IMPLICIT_BACKEND_TEMPLATE_EXTERN
103
104 #endif
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:32
vtkIndexedImplicitBackend
A backend for the vtkImplicitArray framework allowing one to use a subset of a given data array,...
Definition: vtkIndexedImplicitBackend.h:54
vtkIndexedImplicitBackend::~vtkIndexedImplicitBackend
~vtkIndexedImplicitBackend()
vtkIndexedImplicitBackend::vtkIndexedImplicitBackend
vtkIndexedImplicitBackend(vtkDataArray *indexes, vtkDataArray *array)
Constructor.
vtkIndexedImplicitBackend::operator()
ValueType operator()(int idx) const
Indexing operation for the indexed array respecting the backend expectations of vtkImplicitArray
vtkIndexedImplicitBackend::vtkIndexedImplicitBackend
vtkIndexedImplicitBackend(vtkIdList *indexes, vtkDataArray *array)
Constructor.
vtkExternTemplateMacro
#define vtkExternTemplateMacro(decl)
A macro to declare extern templates for all numerical types.
Definition: vtkType.h:410