VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkCommonCoreModule.h" // For export macro
38 #include "vtkDataArray.h"
39 #include "vtkDataArrayTemplate.h" // Real Superclass
40 
41 // Fake the superclass for the wrappers.
42 #define vtkDataArray vtkDataArrayTemplate<int>
43 class VTKCOMMONCORE_EXPORT vtkIntArray : public vtkDataArray
44 #undef vtkDataArray
45 {
46 public:
47  static vtkIntArray* New();
48  vtkTypeMacro(vtkIntArray,vtkDataArray);
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
54  { return VTK_INT; }
56 
58 
59  void GetTupleValue(vtkIdType i, int* tuple)
60  { this->RealSuperclass::GetTupleValue(i, tuple); }
62 
64 
65  void SetTupleValue(vtkIdType i, const int* tuple)
66  { this->RealSuperclass::SetTupleValue(i, tuple); }
68 
70 
72  void InsertTupleValue(vtkIdType i, const int* tuple)
73  { this->RealSuperclass::InsertTupleValue(i, tuple); }
75 
77 
79  vtkIdType InsertNextTupleValue(const int* tuple)
80  { return this->RealSuperclass::InsertNextTupleValue(tuple); }
82 
84 
86  { return this->RealSuperclass::GetValue(id); }
88 
90 
92  void SetValue(vtkIdType id, int value)
93  { this->RealSuperclass::SetValue(id, value); }
95 
97 
101  { this->RealSuperclass::SetNumberOfValues(number); }
103 
105 
106  void InsertValue(vtkIdType id, int f)
107  { this->RealSuperclass::InsertValue(id, f); }
109 
111 
114  { return this->RealSuperclass::InsertNextValue(f); }
116 
118 
120  int *GetValueRange(int comp)
121  { return this->RealSuperclass::GetValueRange(comp); }
122 //BTX
123  void GetValueRange(int range[2], int comp)
124  { this->RealSuperclass::GetValueRange(range, comp); }
125 //ETX
127 
129 
132  { return this->RealSuperclass::GetValueRange(0); }
133 //BTX
134  void GetValueRange(int range[2])
135  { this->RealSuperclass::GetValueRange(range, 0); }
136 //ETX
138 
140  static int GetDataTypeValueMin() { return VTK_INT_MIN; }
141 
143  static int GetDataTypeValueMax() { return VTK_INT_MAX; }
144 
146 
150  { return this->RealSuperclass::WritePointer(id, number); }
152 
154 
157  { return this->RealSuperclass::GetPointer(id); }
159 
161 
167  void SetArray(int* array, vtkIdType size, int save)
168  { this->RealSuperclass::SetArray(array, size, save); }
169  void SetArray(int* array, vtkIdType size, int save, int deleteMethod)
170  { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
172 
173 protected:
174  vtkIntArray(vtkIdType numComp=1);
175  ~vtkIntArray();
176 
177 private:
178  //BTX
179  typedef vtkDataArrayTemplate<int> RealSuperclass;
180  //ETX
181  vtkIntArray(const vtkIntArray&); // Not implemented.
182  void operator=(const vtkIntArray&); // Not implemented.
183 };
184 
185 #endif
void SetArray(int *array, vtkIdType size, int save)
Definition: vtkIntArray.h:167
int GetDataType()
Definition: vtkIntArray.h:53
Implementation template for vtkDataArray.
void GetValueRange(int range[2])
Definition: vtkIntArray.h:134
#define VTK_INT_MAX
Definition: vtkType.h:131
int * GetValueRange()
Definition: vtkIntArray.h:131
static int GetDataTypeValueMax()
Definition: vtkIntArray.h:143
int vtkIdType
Definition: vtkType.h:268
int * GetValueRange(int comp)
Definition: vtkIntArray.h:120
void InsertTupleValue(vtkIdType i, const int *tuple)
Definition: vtkIntArray.h:72
void SetNumberOfValues(vtkIdType number)
Definition: vtkIntArray.h:100
void SetArray(int *array, vtkIdType size, int save, int deleteMethod)
Definition: vtkIntArray.h:169
int GetValue(vtkIdType id)
Definition: vtkIntArray.h:85
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:43
int * GetPointer(vtkIdType id)
Definition: vtkIntArray.h:156
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void GetTupleValue(vtkIdType i, int *tuple)
Definition: vtkIntArray.h:59
void GetValueRange(int range[2], int comp)
Definition: vtkIntArray.h:123
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
int * WritePointer(vtkIdType id, vtkIdType number)
Definition: vtkIntArray.h:149
static int GetDataTypeValueMin()
Definition: vtkIntArray.h:140
void InsertValue(vtkIdType id, int f)
Definition: vtkIntArray.h:106
void PrintSelf(ostream &os, vtkIndent indent)
vtkIdType InsertNextValue(int f)
Definition: vtkIntArray.h:113
static vtkObject * New()
void SetValue(vtkIdType id, int value)
Definition: vtkIntArray.h:92
vtkIdType InsertNextTupleValue(const int *tuple)
Definition: vtkIntArray.h:79
#define VTK_INT
Definition: vtkType.h:31
void SetTupleValue(vtkIdType i, const int *tuple)
Definition: vtkIntArray.h:65
#define VTK_INT_MIN
Definition: vtkType.h:130