VTK
dox/Common/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 "vtkObject.h"
00029 
00030 class vtkDataArraySelectionInternals;
00031 
00032 class VTK_COMMON_EXPORT vtkDataArraySelection : public vtkObject
00033 {
00034 public:
00035   vtkTypeMacro(vtkDataArraySelection,vtkObject);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037   static vtkDataArraySelection* New();
00038 
00041   void EnableArray(const char* name);
00042 
00045   void DisableArray(const char* name);
00046 
00049   int ArrayIsEnabled(const char* name);
00050 
00052   int ArrayExists(const char* name);
00053 
00055   void EnableAllArrays();
00056 
00058   void DisableAllArrays();
00059 
00061   int GetNumberOfArrays();
00062 
00064   int GetNumberOfArraysEnabled();
00065 
00067   const char* GetArrayName(int index);
00068 
00070   int GetArrayIndex(const char *name);
00071 
00074   int GetEnabledArrayIndex(const char* name);
00075 
00077 
00078   int GetArraySetting(const char* name)
00079     {
00080     return this->GetArraySetting(this->GetArrayIndex(name));
00081     }
00082   int GetArraySetting(int index);
00084 
00086   void RemoveAllArrays();
00087 
00088   //BTX
00093   int AddArray(const char* name);
00094 
00096   void RemoveArrayByIndex(int index);
00097 
00099   void RemoveArrayByName(const char* name);
00100 
00102 
00110   void SetArrays(const char* const* names, int numArrays);
00111   void SetArraysWithDefault(const char* const* names, int numArrays,
00112                             int defaultStatus);
00113   //ETX
00115 
00117 
00118   void CopySelections(vtkDataArraySelection* selections);
00119 protected:
00120   vtkDataArraySelection();
00121   ~vtkDataArraySelection();
00123 
00124   // Internal implementation details.
00125   vtkDataArraySelectionInternals* Internal;
00126 
00127 private:
00128   vtkDataArraySelection(const vtkDataArraySelection&);  // Not implemented.
00129   void operator=(const vtkDataArraySelection&);  // Not implemented.
00130 };
00131 
00132 #endif