VTK  9.3.0
vtkCompositeImplicitBackend.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 vtkCompositeImplicitBackend_h
5 #define vtkCompositeImplicitBackend_h
6 
41 #include "vtkCommonCoreModule.h"
42 
43 #include <memory>
44 #include <vector>
45 
46 VTK_ABI_NAMESPACE_BEGIN
47 class vtkDataArray;
48 template <typename ValueType>
49 class VTKCOMMONCORE_EXPORT vtkCompositeImplicitBackend final
50 {
51 public:
57  vtkCompositeImplicitBackend(const std::vector<vtkDataArray*>& arrays);
59 
67  ValueType operator()(int idx) const;
68 
69 protected:
70  struct Internals;
71  std::unique_ptr<Internals> Internal;
72 };
73 VTK_ABI_NAMESPACE_END
74 
75 #endif // vtkCompositeImplicitBackend_h
76 
77 #ifdef VTK_COMPOSITE_BACKEND_INSTANTIATING
78 #define VTK_INSTANTIATE_COMPOSITE_BACKEND(ValueType) \
79  VTK_ABI_NAMESPACE_BEGIN \
80  template class VTKCOMMONCORE_EXPORT vtkCompositeImplicitBackend<ValueType>; \
81  VTK_ABI_NAMESPACE_END
82 #endif
A utility structure serving as a backend for composite arrays: an array composed of multiple arrays c...
vtkCompositeImplicitBackend(const std::vector< vtkDataArray * > &arrays)
Constructor for the backend.
std::unique_ptr< Internals > Internal
ValueType operator()(int idx) const
Indexing operator for the composite of the two arrays respecting the vtkImplicitArray expectations.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:45