VTK
vtkShortArray.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkShortArray.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 =========================================================================*/
26 #ifndef __vtkShortArray_h
27 #define __vtkShortArray_h
28 
29 // Tell the template header how to give our superclass a DLL interface.
30 #if !defined(__vtkShortArray_cxx)
31 # define VTK_DATA_ARRAY_TEMPLATE_TYPE short
32 #endif
33 
34 #include "vtkDataArray.h"
35 #include "vtkDataArrayTemplate.h" // Real Superclass
36 
37 // Fake the superclass for the wrappers.
38 #define vtkDataArray vtkDataArrayTemplate<short>
40 #undef vtkDataArray
41 {
42 public:
43  static vtkShortArray* New();
44  vtkTypeMacro(vtkShortArray,vtkDataArray);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
50  { return VTK_SHORT; }
52 
54 
55  void GetTupleValue(vtkIdType i, short* tuple)
56  { this->RealSuperclass::GetTupleValue(i, tuple); }
58 
60 
61  void SetTupleValue(vtkIdType i, const short* tuple)
62  { this->RealSuperclass::SetTupleValue(i, tuple); }
64 
66 
68  void InsertTupleValue(vtkIdType i, const short* tuple)
69  { this->RealSuperclass::InsertTupleValue(i, tuple); }
71 
73 
75  vtkIdType InsertNextTupleValue(const short* tuple)
76  { return this->RealSuperclass::InsertNextTupleValue(tuple); }
78 
80 
81  short GetValue(vtkIdType id)
82  { return this->RealSuperclass::GetValue(id); }
84 
86 
88  void SetValue(vtkIdType id, short value)
89  { this->RealSuperclass::SetValue(id, value); }
91 
93 
97  { this->RealSuperclass::SetNumberOfValues(number); }
99 
101 
102  void InsertValue(vtkIdType id, short f)
103  { this->RealSuperclass::InsertValue(id, f); }
105 
107 
110  { return this->RealSuperclass::InsertNextValue(f); }
112 
114 
116  short *GetValueRange(int comp)
117  { return this->RealSuperclass::GetValueRange(comp); }
118 //BTX
119  void GetValueRange(short range[2], int comp)
120  { this->RealSuperclass::GetValueRange(range, comp); }
121 //ETX
123 
125 
127  short *GetValueRange()
128  { return this->RealSuperclass::GetValueRange(0); }
129 //BTX
130  void GetValueRange(short range[2])
131  { this->RealSuperclass::GetValueRange(range, 0); }
132 //ETX
134 
136  static short GetDataTypeValueMin() { return VTK_SHORT_MIN; }
137 
139  static short GetDataTypeValueMax() { return VTK_SHORT_MAX; }
140 
142 
145  short* WritePointer(vtkIdType id, vtkIdType number)
146  { return this->RealSuperclass::WritePointer(id, number); }
148 
150 
153  { return this->RealSuperclass::GetPointer(id); }
155 
157 
163  void SetArray(short* array, vtkIdType size, int save)
164  { this->RealSuperclass::SetArray(array, size, save); }
165  void SetArray(short* array, vtkIdType size, int save, int deleteMethod)
166  { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
168 
169 protected:
170  vtkShortArray(vtkIdType numComp=1);
171  ~vtkShortArray();
172 
173 private:
174  //BTX
175  typedef vtkDataArrayTemplate<short> RealSuperclass;
176  //ETX
177  vtkShortArray(const vtkShortArray&); // Not implemented.
178  void operator=(const vtkShortArray&); // Not implemented.
179 };
180 
181 #endif
short * GetValueRange()
Implementation template for vtkDataArray.
vtkIdType InsertNextTupleValue(const short *tuple)
Definition: vtkShortArray.h:75
short * WritePointer(vtkIdType id, vtkIdType number)
dynamic, self-adjusting array of short
Definition: vtkShortArray.h:39
void GetValueRange(short range[2], int comp)
vtkIdType InsertNextValue(short f)
void GetTupleValue(vtkIdType i, short *tuple)
Definition: vtkShortArray.h:55
short * GetValueRange(int comp)
void SetTupleValue(vtkIdType i, const short *tuple)
Definition: vtkShortArray.h:61
#define VTK_SHORT_MIN
Definition: vtkType.h:118
int vtkIdType
Definition: vtkType.h:255
void InsertValue(vtkIdType id, short f)
void SetArray(short *array, vtkIdType size, int save, int deleteMethod)
short GetValue(vtkIdType id)
Definition: vtkShortArray.h:81
a simple class to control print indentation
Definition: vtkIndent.h:37
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void SetValue(vtkIdType id, short value)
Definition: vtkShortArray.h:88
#define VTK_SHORT
Definition: vtkType.h:29
short * GetPointer(vtkIdType id)
#define VTK_COMMON_EXPORT
void InsertTupleValue(vtkIdType i, const short *tuple)
Definition: vtkShortArray.h:68
#define VTK_SHORT_MAX
Definition: vtkType.h:119
void GetValueRange(short range[2])
void SetArray(short *array, vtkIdType size, int save)
void save(Archiver &ar, const vtkVariant &variant, const unsigned int vtkNotUsed(version))
void PrintSelf(ostream &os, vtkIndent indent)
void SetNumberOfValues(vtkIdType number)
Definition: vtkShortArray.h:96
static vtkObject * New()
static short GetDataTypeValueMax()
static short GetDataTypeValueMin()