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 =========================================================================*/
29 #ifndef vtkDataArraySelection_h
30 #define vtkDataArraySelection_h
31 
32 #include "vtkCommonCoreModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkDataArraySelectionInternals;
36 
37 class VTKCOMMONCORE_EXPORT vtkDataArraySelection : public vtkObject
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42  static vtkDataArraySelection* New();
43 
48  void EnableArray(const char* name);
49 
54  void DisableArray(const char* name);
55 
60  int ArrayIsEnabled(const char* name);
61 
65  int ArrayExists(const char* name);
66 
70  void EnableAllArrays();
71 
75  void DisableAllArrays();
76 
80  int GetNumberOfArrays();
81 
85  int GetNumberOfArraysEnabled();
86 
90  const char* GetArrayName(int index);
91 
95  int GetArrayIndex(const char *name);
96 
101  int GetEnabledArrayIndex(const char* name);
102 
106  int GetArraySetting(int index);
107 
111  int GetArraySetting(const char* name)
112  {
113  return this->GetArraySetting(this->GetArrayIndex(name));
114  }
115 
120  void SetArraySetting(const char* name, int status);
121 
125  void RemoveAllArrays();
126 
135  int AddArray(const char* name, bool state=true);
136 
140  void RemoveArrayByIndex(int index);
141 
145  void RemoveArrayByName(const char* name);
146 
148 
158  void SetArrays(const char* const* names, int numArrays);
159  void SetArraysWithDefault(const char* const* names, int numArrays,
160  int defaultStatus);
162 
166  void CopySelections(vtkDataArraySelection* selections);
167 
174  void Union(vtkDataArraySelection* other);
175 
176 protected:
178  ~vtkDataArraySelection() override;
179 
180  // Internal implementation details.
181  vtkDataArraySelectionInternals* Internal;
182 
183 private:
185  void operator=(const vtkDataArraySelection&) = delete;
186 };
187 
188 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
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:39
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...