VTK  9.3.20241006
vtkDGOperationStateEntry.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#ifndef vtkDGOperationStateEntry_h
4#define vtkDGOperationStateEntry_h
5
6#include "vtkCompiler.h" // For export macro.
8#include "vtkType.h" // For vtkTypeUInt64.
9
10#include <functional> // For std::function<>.
11#include <memory> // For std::unique_ptr<>.
12
13VTK_ABI_NAMESPACE_BEGIN
14
15class vtkDataArray;
16class vtkDoubleArray;
17
19template <typename InputIterator, typename OutputIterator>
20using vtkDGCellRangeEvaluator = std::function<void(
21 InputIterator& inIter, OutputIterator& outIter, vtkTypeUInt64 begin, vtkTypeUInt64 end)>;
22
28class VTKFILTERSCELLGRID_EXPORT vtkDGOperationStateEntryBase
29{
30public:
31 virtual ~vtkDGOperationStateEntryBase() = default;
32};
33
38template <typename InputIterator, typename OutputIterator>
40{
41public:
44 {
45 other.State->CloneInto(*this);
46 }
47
52 {
53 // CloneInto should also set this->Function.
54 other.State->CloneInto(*this);
55 return *this;
56 }
57
58 std::unique_ptr<vtkDGOperationState> State;
60};
61
62VTK_ABI_NAMESPACE_END
63
64#endif // vtkDGOperationStateEntry_h
65// VTK-HeaderTest-Exclude: vtkDGOperationStateEntry.h
This is a base class that exists so that vtkDGOperationState can provide a virtual CloneInto method t...
virtual ~vtkDGOperationStateEntryBase()=default
Encapsulate the state required to evaluate DG cell-attributes.
std::unique_ptr< vtkDGOperationState > State
vtkDGOperationStateEntry(const vtkDGOperationStateEntry< InputIterator, OutputIterator > &other)
vtkDGOperationStateEntry< InputIterator, OutputIterator > & operator=(const vtkDGOperationStateEntry< InputIterator, OutputIterator > &other)
vtkDGOperationStateEntry< InputIterator, OutputIterator > & operator=(vtkDGOperationStateEntry< InputIterator, OutputIterator > &&other)=default
vtkDGCellRangeEvaluator< InputIterator, OutputIterator > Function
vtkDGOperationStateEntry()=default
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of double
#define VTK_ALWAYS_EXPORT
Definition vtkCompiler.h:65
std::function< void(InputIterator &inIter, OutputIterator &outIter, vtkTypeUInt64 begin, vtkTypeUInt64 end)> vtkDGCellRangeEvaluator
Signature for a method to evaluate data on a single vtkDGCell::Source instance.