VTK
vtkDataArraySelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataArraySelection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkDataArraySelection_h
27 #define vtkDataArraySelection_h
28 
29 #include "vtkCommonCoreModule.h" // For export macro
30 #include "vtkObject.h"
31 
32 class vtkDataArraySelectionInternals;
33 
34 class VTKCOMMONCORE_EXPORT vtkDataArraySelection : public vtkObject
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39  static vtkDataArraySelection* New();
40 
45  void EnableArray(const char* name);
46 
51  void DisableArray(const char* name);
52 
57  int ArrayIsEnabled(const char* name);
58 
62  int ArrayExists(const char* name);
63 
67  void EnableAllArrays();
68 
72  void DisableAllArrays();
73 
77  int GetNumberOfArrays();
78 
82  int GetNumberOfArraysEnabled();
83 
87  const char* GetArrayName(int index);
88 
92  int GetArrayIndex(const char *name);
93 
98  int GetEnabledArrayIndex(const char* name);
99 
103  int GetArraySetting(int index);
104 
108  int GetArraySetting(const char* name)
109  {
110  return this->GetArraySetting(this->GetArrayIndex(name));
111  }
112 
117  void SetArraySetting(const char* name, int status);
118 
122  void RemoveAllArrays();
123 
131  int AddArray(const char* name);
132 
136  void RemoveArrayByIndex(int index);
137 
141  void RemoveArrayByName(const char* name);
142 
144 
154  void SetArrays(const char* const* names, int numArrays);
155  void SetArraysWithDefault(const char* const* names, int numArrays,
156  int defaultStatus);
158 
162  void CopySelections(vtkDataArraySelection* selections);
163 
170  void Union(vtkDataArraySelection* other);
171 
172 protected:
174  ~vtkDataArraySelection() override;
175 
176  // Internal implementation details.
177  vtkDataArraySelectionInternals* Internal;
178 
179 private:
181  void operator=(const vtkDataArraySelection&) = delete;
182 };
183 
184 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:53
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
Store on/off settings for data arrays for a vtkSource.
int GetArraySetting(const char *name)
Get whether the array is enabled/disable using its name.
vtkDataArraySelectionInternals * Internal
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.