VTK
vtkMapArrayValues.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMapArrayValues.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 =========================================================================*/
38 #ifndef __vtkMapArrayValues_h
39 #define __vtkMapArrayValues_h
40 
42 
43 class vtkMapType;
44 class vtkVariant;
45 
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
52  static vtkMapArrayValues *New();
53 
55 
57  vtkSetMacro(FieldType, int);
58  vtkGetMacro(FieldType, int);
60 
62 
65  vtkSetMacro(PassArray, int);
66  vtkGetMacro(PassArray, int);
67  vtkBooleanMacro(PassArray, int);
69 
71 
74  vtkSetMacro(FillValue, double);
75  vtkGetMacro(FillValue, double);
77 
79 
81  vtkSetStringMacro(InputArrayName);
82  vtkGetStringMacro(InputArrayName);
84 
86 
87  vtkSetStringMacro(OutputArrayName);
88  vtkGetStringMacro(OutputArrayName);
90 
92 
94  vtkGetMacro(OutputArrayType, int);
95  vtkSetMacro(OutputArrayType, int);
97 
99 
102  void AddToMap(vtkVariant from, vtkVariant to);
103  void AddToMap(int from, int to);
104  void AddToMap(int from, char *to);
105  void AddToMap(char *from, int to);
106  void AddToMap(char *from, char *to);
108 
110  void ClearMap();
111 
113  int GetMapSize();
114 
115 //BTX
116  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
118  {
119  POINT_DATA=0,
120  CELL_DATA=1,
121  VERTEX_DATA=2,
122  EDGE_DATA=3,
123  ROW_DATA=4,
124  NUM_ATTRIBUTE_LOCS
125  };
126 //ETX
127 
128 protected:
129 
131  virtual ~vtkMapArrayValues();
132 
135 
140  int MapType;
142  double FillValue;
143 
144  // PIMPL idiom to hide map implementation.
145  vtkMapType *Map;
146 
147 private:
148  vtkMapArrayValues(const vtkMapArrayValues&); // Not implemented.
149  void operator=(const vtkMapArrayValues&); // Not implemented.
150 };
151 
152 #endif