VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkCommonCoreModule.h" // For export macro
35 #include "vtkDataArray.h"
36 #include "vtkDataArrayTemplate.h" // Real Superclass
37 
38 // Fake the superclass for the wrappers.
39 #define vtkDataArray vtkDataArrayTemplate<short>
40 class VTKCOMMONCORE_EXPORT vtkShortArray : public vtkDataArray
41 #undef vtkDataArray
42 {
43 public:
44  static vtkShortArray* New();
45  vtkTypeMacro(vtkShortArray,vtkDataArray);
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
51  { return VTK_SHORT; }
53 
55 
56  void GetTupleValue(vtkIdType i, short* tuple)
57  { this->RealSuperclass::GetTupleValue(i, tuple); }
59 
61 
62  void SetTupleValue(vtkIdType i, const short* tuple)
63  { this->RealSuperclass::SetTupleValue(i, tuple); }
65 
67 
69  void InsertTupleValue(vtkIdType i, const short* tuple)
70  { this->RealSuperclass::InsertTupleValue(i, tuple); }
72 
74 
76  vtkIdType InsertNextTupleValue(const short* tuple)
77  { return this->RealSuperclass::InsertNextTupleValue(tuple); }
79 
81 
82  short GetValue(vtkIdType id)
83  { return this->RealSuperclass::GetValue(id); }
85 
87 
89  void SetValue(vtkIdType id, short value)
90  { this->RealSuperclass::SetValue(id, value); }
92 
94 
98  { this->RealSuperclass::SetNumberOfValues(number); }
100 
102 
103  void InsertValue(vtkIdType id, short f)
104  { this->RealSuperclass::InsertValue(id, f); }
106 
108 
111  { return this->RealSuperclass::InsertNextValue(f); }
113 
115 
117  short *GetValueRange(int comp)
118  { return this->RealSuperclass::GetValueRange(comp); }
119 //BTX
120  void GetValueRange(short range[2], int comp)
121  { this->RealSuperclass::GetValueRange(range, comp); }
122 //ETX
124 
126 
128  short *GetValueRange()
129  { return this->RealSuperclass::GetValueRange(0); }
130 //BTX
131  void GetValueRange(short range[2])
132  { this->RealSuperclass::GetValueRange(range, 0); }
133 //ETX
135 
137  static short GetDataTypeValueMin() { return VTK_SHORT_MIN; }
138 
140  static short GetDataTypeValueMax() { return VTK_SHORT_MAX; }
141 
143 
146  short* WritePointer(vtkIdType id, vtkIdType number)
147  { return this->RealSuperclass::WritePointer(id, number); }
149 
151 
154  { return this->RealSuperclass::GetPointer(id); }
156 
158 
164  void SetArray(short* array, vtkIdType size, int save)
165  { this->RealSuperclass::SetArray(array, size, save); }
166  void SetArray(short* array, vtkIdType size, int save, int deleteMethod)
167  { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
169 
170 protected:
171  vtkShortArray(vtkIdType numComp=1);
172  ~vtkShortArray();
173 
174 private:
175  //BTX
176  typedef vtkDataArrayTemplate<short> RealSuperclass;
177  //ETX
178  vtkShortArray(const vtkShortArray&); // Not implemented.
179  void operator=(const vtkShortArray&); // Not implemented.
180 };
181 
182 #endif
short * GetValueRange()
Implementation template for vtkDataArray.
vtkIdType InsertNextTupleValue(const short *tuple)
Definition: vtkShortArray.h:76
short * WritePointer(vtkIdType id, vtkIdType number)
dynamic, self-adjusting array of short
Definition: vtkShortArray.h:40
void GetValueRange(short range[2], int comp)
vtkIdType InsertNextValue(short f)
void GetTupleValue(vtkIdType i, short *tuple)
Definition: vtkShortArray.h:56
short * GetValueRange(int comp)
void SetTupleValue(vtkIdType i, const short *tuple)
Definition: vtkShortArray.h:62
#define VTK_SHORT_MIN
Definition: vtkType.h:126
int vtkIdType
Definition: vtkType.h:268
void InsertValue(vtkIdType id, short f)
void SetArray(short *array, vtkIdType size, int save, int deleteMethod)
short GetValue(vtkIdType id)
Definition: vtkShortArray.h:82
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void SetValue(vtkIdType id, short value)
Definition: vtkShortArray.h:89
#define VTK_SHORT
Definition: vtkType.h:29
short * GetPointer(vtkIdType id)
void InsertTupleValue(vtkIdType i, const short *tuple)
Definition: vtkShortArray.h:69
#define VTK_SHORT_MAX
Definition: vtkType.h:127
void GetValueRange(short range[2])
void SetArray(short *array, vtkIdType size, int save)
void PrintSelf(ostream &os, vtkIndent indent)
void SetNumberOfValues(vtkIdType number)
Definition: vtkShortArray.h:97
static vtkObject * New()
static short GetDataTypeValueMax()
static short GetDataTypeValueMin()