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) VTK_OVERRIDE;
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 
68 
73 
78 
83 
87  const char* GetArrayName(int index);
88 
92  int GetArrayIndex(const char *name);
93 
98  int GetEnabledArrayIndex(const char* name);
99 
101 
104  int GetArraySetting(const char* name)
105  {
106  return this->GetArraySetting(this->GetArrayIndex(name));
107  }
110 
115 
123  int AddArray(const char* name);
124 
129 
133  void RemoveArrayByName(const char* name);
134 
136 
146  void SetArrays(const char* const* names, int numArrays);
147  void SetArraysWithDefault(const char* const* names, int numArrays,
148  int defaultStatus);
150 
155 
156 protected:
158  ~vtkDataArraySelection() VTK_OVERRIDE;
159 
160  // Internal implementation details.
161  vtkDataArraySelectionInternals* Internal;
162 
163 private:
164  vtkDataArraySelection(const vtkDataArraySelection&) VTK_DELETE_FUNCTION;
165  void operator=(const vtkDataArraySelection&) VTK_DELETE_FUNCTION;
166 };
167 
168 #endif
vtkDataArraySelection::CopySelections
void CopySelections(vtkDataArraySelection *selections)
Copy the selections from the given vtkDataArraySelection instance.
vtkDataArraySelection::DisableAllArrays
void DisableAllArrays()
Disable all arrays that currently have an entry.
vtkDataArraySelection::EnableArray
void EnableArray(const char *name)
Enable the array with the given name.
vtkDataArraySelection::SetArrays
void SetArrays(const char *const *names, int numArrays)
Set the list of arrays that have entries.
vtkDataArraySelection::GetEnabledArrayIndex
int GetEnabledArrayIndex(const char *name)
Get the index of an array with the given name among those that are enabled.
vtkDataArraySelection::GetArrayIndex
int GetArrayIndex(const char *name)
Get an index of the array with the given name.
vtkDataArraySelection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkDataArraySelection::vtkDataArraySelection
vtkDataArraySelection()
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:35
vtkDataArraySelection::SetArraysWithDefault
void SetArraysWithDefault(const char *const *names, int numArrays, int defaultStatus)
vtkDataArraySelection::GetArraySetting
int GetArraySetting(const char *name)
Get whether the array at the given index is enabled.
Definition: vtkDataArraySelection.h:104
vtkDataArraySelection::New
static vtkDataArraySelection * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkDataArraySelection::RemoveArrayByIndex
void RemoveArrayByIndex(int index)
Remove an array setting given its index.
vtkDataArraySelection::ArrayIsEnabled
int ArrayIsEnabled(const char *name)
Return whether the array with the given name is enabled.
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkObject.h
vtkDataArraySelection::ArrayExists
int ArrayExists(const char *name)
Return whether the array with the given name exists.
vtkDataArraySelection::AddArray
int AddArray(const char *name)
Add to the list of arrays that have entries.
vtkDataArraySelection::EnableAllArrays
void EnableAllArrays()
Enable all arrays that currently have an entry.
vtkDataArraySelection::RemoveAllArrays
void RemoveAllArrays()
Remove all array entries.
vtkDataArraySelection::DisableArray
void DisableArray(const char *name)
Disable the array with the given name.
vtkDataArraySelection::GetArraySetting
int GetArraySetting(int index)
vtkDataArraySelection::GetNumberOfArraysEnabled
int GetNumberOfArraysEnabled()
Get the number of arrays that are enabled.
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkDataArraySelection::GetNumberOfArrays
int GetNumberOfArrays()
Get the number of arrays that currently have an entry.
vtkDataArraySelection::RemoveArrayByName
void RemoveArrayByName(const char *name)
Remove an array setting given its name.
vtkDataArraySelection::~vtkDataArraySelection
~vtkDataArraySelection() override
vtkDataArraySelection::GetArrayName
const char * GetArrayName(int index)
Get the name of the array entry at the given index.