VTK  9.7.20260917
vtkMapArrayValues.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
29
30#ifndef vtkMapArrayValues_h
31#define vtkMapArrayValues_h
32
34#include "vtkRenderingCoreModule.h" // For export macro
35#include "vtkVariant.h"
36#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
37
38#include <map> // for ivar
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkVariant;
42
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
52
57 vtkSetMacro(FieldType, int);
58 vtkGetMacro(FieldType, int);
60
62
67 vtkSetMacro(PassArray, vtkTypeBool);
68 vtkGetMacro(PassArray, vtkTypeBool);
69 vtkBooleanMacro(PassArray, vtkTypeBool);
71
73
78 vtkSetMacro(FillValue, double);
79 vtkGetMacro(FillValue, double);
81
83
86 vtkSetStringMacro(InputArrayName);
87 vtkGetStringMacro(InputArrayName);
89
91
94 vtkSetStringMacro(OutputArrayName);
95 vtkGetStringMacro(OutputArrayName);
97
99
103 vtkGetMacro(OutputArrayType, int);
104 vtkSetMacro(OutputArrayType, int);
106
108
113 void AddToMap(int from, int to);
114 void AddToMap(int from, const char* to);
115 void AddToMap(const char* from, int to);
116 void AddToMap(const char* from, const char* to);
118
122 void ClearMap();
123
124 const std::map<vtkVariant, vtkVariant>& GetMap() const { return this->Map; };
125
130
131 // Always keep NUM_ATTRIBUTE_LOCS as the last entry
141
142protected:
145
148
155 double FillValue;
156
157 std::map<vtkVariant, vtkVariant> Map;
158
159private:
160 vtkMapArrayValues(const vtkMapArrayValues&) = delete;
161 void operator=(const vtkMapArrayValues&) = delete;
162};
163
164VTK_ABI_NAMESPACE_END
165#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
int GetMapSize()
Get the size of the internal map.
void ClearMap()
Clear the internal map.
void AddToMap(const char *from, int to)
Add to the internal STL map.
void AddToMap(const char *from, const char *to)
Add to the internal STL map.
void AddToMap(int from, const char *to)
Add to the internal STL map.
static vtkMapArrayValues * New()
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void AddToMap(vtkVariant from, vtkVariant to)
Add to the internal STL map.
~vtkMapArrayValues() override
void AddToMap(int from, int to)
Add to the internal STL map.
const std::map< vtkVariant, vtkVariant > & GetMap() const
std::map< vtkVariant, vtkVariant > Map
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A type representing the union of many types.
Definition vtkVariant.h:162
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALMANUAL