VTK
vtkIntArray.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIntArray.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 __vtkIntArray_h
30 #define __vtkIntArray_h
31 
32 // Tell the template header how to give our superclass a DLL interface.
33 #if !defined(__vtkIntArray_cxx) && (defined(VTK_USE_64BIT_IDS) || !defined(__vtkIdTypeArray_h))
34 # define VTK_DATA_ARRAY_TEMPLATE_TYPE int
35 #endif
36 
37 #include "vtkDataArray.h"
38 #include "vtkDataArrayTemplate.h" // Real Superclass
39 
40 // Fake the superclass for the wrappers.
41 #define vtkDataArray vtkDataArrayTemplate<int>
43 #undef vtkDataArray
44 {
45 public:
46  static vtkIntArray* New();
47  vtkTypeMacro(vtkIntArray,vtkDataArray);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
53  { return VTK_INT; }
55 
57 
58  void GetTupleValue(vtkIdType i, int* tuple)
59  { this->RealSuperclass::GetTupleValue(i, tuple); }
61 
63 
64  void SetTupleValue(vtkIdType i, const int* tuple)
65  { this->RealSuperclass::SetTupleValue(i, tuple); }
67 
69 
71  void InsertTupleValue(vtkIdType i, const int* tuple)
72  { this->RealSuperclass::InsertTupleValue(i, tuple); }
74 
76 
78  vtkIdType InsertNextTupleValue(const int* tuple)
79  { return this->RealSuperclass::InsertNextTupleValue(tuple); }
81 
83 
85  { return this->RealSuperclass::GetValue(id); }
87 
89 
91  void SetValue(vtkIdType id, int value)
92  { this->RealSuperclass::SetValue(id, value); }
94 
96 
100  { this->RealSuperclass::SetNumberOfValues(number); }
102 
104 
105  void InsertValue(vtkIdType id, int f)
106  { this->RealSuperclass::InsertValue(id, f); }
108 
110 
113  { return this->RealSuperclass::InsertNextValue(f); }
115 
117 
119  int *GetValueRange(int comp)
120  { return this->RealSuperclass::GetValueRange(comp); }
121 //BTX
122  void GetValueRange(int range[2], int comp)
123  { this->RealSuperclass::GetValueRange(range, comp); }
124 //ETX
126 
128 
131  { return this->RealSuperclass::GetValueRange(0); }
132 //BTX
133  void GetValueRange(int range[2])
134  { this->RealSuperclass::GetValueRange(range, 0); }
135 //ETX
137 
139  static int GetDataTypeValueMin() { return VTK_INT_MIN; }
140 
142  static int GetDataTypeValueMax() { return VTK_INT_MAX; }
143 
145 
149  { return this->RealSuperclass::WritePointer(id, number); }
151 
153 
156  { return this->RealSuperclass::GetPointer(id); }
158 
160 
166  void SetArray(int* array, vtkIdType size, int save)
167  { this->RealSuperclass::SetArray(array, size, save); }
168  void SetArray(int* array, vtkIdType size, int save, int deleteMethod)
169  { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
171 
172 protected:
173  vtkIntArray(vtkIdType numComp=1);
174  ~vtkIntArray();
175 
176 private:
177  //BTX
178  typedef vtkDataArrayTemplate<int> RealSuperclass;
179  //ETX
180  vtkIntArray(const vtkIntArray&); // Not implemented.
181  void operator=(const vtkIntArray&); // Not implemented.
182 };
183 
184 #endif
void SetArray(int *array, vtkIdType size, int save)
Definition: vtkIntArray.h:166
int GetDataType()
Definition: vtkIntArray.h:52
Implementation template for vtkDataArray.
void GetValueRange(int range[2])
Definition: vtkIntArray.h:133
#define VTK_INT_MAX
Definition: vtkType.h:123
int * GetValueRange()
Definition: vtkIntArray.h:130
static int GetDataTypeValueMax()
Definition: vtkIntArray.h:142
int vtkIdType
Definition: vtkType.h:255
int * GetValueRange(int comp)
Definition: vtkIntArray.h:119
void InsertTupleValue(vtkIdType i, const int *tuple)
Definition: vtkIntArray.h:71
void SetNumberOfValues(vtkIdType number)
Definition: vtkIntArray.h:99
void SetArray(int *array, vtkIdType size, int save, int deleteMethod)
Definition: vtkIntArray.h:168
int GetValue(vtkIdType id)
Definition: vtkIntArray.h:84
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:42
int * GetPointer(vtkIdType id)
Definition: vtkIntArray.h:155
a simple class to control print indentation
Definition: vtkIndent.h:37
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void GetTupleValue(vtkIdType i, int *tuple)
Definition: vtkIntArray.h:58
#define VTK_COMMON_EXPORT
void GetValueRange(int range[2], int comp)
Definition: vtkIntArray.h:122
int * WritePointer(vtkIdType id, vtkIdType number)
Definition: vtkIntArray.h:148
static int GetDataTypeValueMin()
Definition: vtkIntArray.h:139
void InsertValue(vtkIdType id, int f)
Definition: vtkIntArray.h:105
void save(Archiver &ar, const vtkVariant &variant, const unsigned int vtkNotUsed(version))
void PrintSelf(ostream &os, vtkIndent indent)
vtkIdType InsertNextValue(int f)
Definition: vtkIntArray.h:112
static vtkObject * New()
void SetValue(vtkIdType id, int value)
Definition: vtkIntArray.h:91
vtkIdType InsertNextTupleValue(const int *tuple)
Definition: vtkIntArray.h:78
#define VTK_INT
Definition: vtkType.h:31
void SetTupleValue(vtkIdType i, const int *tuple)
Definition: vtkIntArray.h:64
#define VTK_INT_MIN
Definition: vtkType.h:122