VTK
dox/Common/Core/vtkDataArraySelection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDataArraySelection.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00025 #ifndef __vtkDataArraySelection_h
00026 #define __vtkDataArraySelection_h
00027 
00028 #include "vtkCommonCoreModule.h" // For export macro
00029 #include "vtkObject.h"
00030 
00031 class vtkDataArraySelectionInternals;
00032 
00033 class VTKCOMMONCORE_EXPORT vtkDataArraySelection : public vtkObject
00034 {
00035 public:
00036   vtkTypeMacro(vtkDataArraySelection,vtkObject);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038   static vtkDataArraySelection* New();
00039 
00042   void EnableArray(const char* name);
00043 
00046   void DisableArray(const char* name);
00047 
00050   int ArrayIsEnabled(const char* name);
00051 
00053   int ArrayExists(const char* name);
00054 
00056   void EnableAllArrays();
00057 
00059   void DisableAllArrays();
00060 
00062   int GetNumberOfArrays();
00063 
00065   int GetNumberOfArraysEnabled();
00066 
00068   const char* GetArrayName(int index);
00069 
00071   int GetArrayIndex(const char *name);
00072 
00075   int GetEnabledArrayIndex(const char* name);
00076 
00078 
00079   int GetArraySetting(const char* name)
00080     {
00081     return this->GetArraySetting(this->GetArrayIndex(name));
00082     }
00083   int GetArraySetting(int index);
00085 
00087   void RemoveAllArrays();
00088 
00089   //BTX
00094   int AddArray(const char* name);
00095 
00097   void RemoveArrayByIndex(int index);
00098 
00100   void RemoveArrayByName(const char* name);
00101 
00103 
00111   void SetArrays(const char* const* names, int numArrays);
00112   void SetArraysWithDefault(const char* const* names, int numArrays,
00113                             int defaultStatus);
00114   //ETX
00116 
00118 
00119   void CopySelections(vtkDataArraySelection* selections);
00120 protected:
00121   vtkDataArraySelection();
00122   ~vtkDataArraySelection();
00124 
00125   // Internal implementation details.
00126   vtkDataArraySelectionInternals* Internal;
00127 
00128 private:
00129   vtkDataArraySelection(const vtkDataArraySelection&);  // Not implemented.
00130   void operator=(const vtkDataArraySelection&);  // Not implemented.
00131 };
00132 
00133 #endif