VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkUnsignedShortArray.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUnsignedShortArray.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 __vtkUnsignedShortArray_h
27 #define __vtkUnsignedShortArray_h
28 
29 // Tell the template header how to give our superclass a DLL interface.
30 #if !defined(__vtkUnsignedShortArray_cxx)
31 # define VTK_DATA_ARRAY_TEMPLATE_TYPE unsigned 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<unsigned short>
40 class VTKCOMMONCORE_EXPORT vtkUnsignedShortArray : public vtkDataArray
41 #undef vtkDataArray
42 {
43 public:
44  static vtkUnsignedShortArray* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
51  { return VTK_UNSIGNED_SHORT; }
53 
55 
56  void GetTupleValue(vtkIdType i, unsigned short* tuple)
57  { this->RealSuperclass::GetTupleValue(i, tuple); }
59 
61 
62  void SetTupleValue(vtkIdType i, const unsigned short* tuple)
63  { this->RealSuperclass::SetTupleValue(i, tuple); }
65 
67 
69  void InsertTupleValue(vtkIdType i, const unsigned short* tuple)
70  { this->RealSuperclass::InsertTupleValue(i, tuple); }
72 
74 
76  vtkIdType InsertNextTupleValue(const unsigned short* tuple)
77  { return this->RealSuperclass::InsertNextTupleValue(tuple); }
79 
81 
82  unsigned short GetValue(vtkIdType id)
83  { return this->RealSuperclass::GetValue(id); }
85 
87 
89  void SetValue(vtkIdType id, unsigned short value)
90  { this->RealSuperclass::SetValue(id, value); }
92 
94 
98  { this->RealSuperclass::SetNumberOfValues(number); }
100 
102 
103  void InsertValue(vtkIdType id, unsigned short f)
104  { this->RealSuperclass::InsertValue(id, f); }
106 
108 
110  vtkIdType InsertNextValue(unsigned short f)
111  { return this->RealSuperclass::InsertNextValue(f); }
113 
115 
117  unsigned short *GetValueRange(int comp)
118  { return this->RealSuperclass::GetValueRange(comp); }
119 //BTX
120  void GetValueRange(unsigned short range[2], int comp)
121  { this->RealSuperclass::GetValueRange(range, comp); }
122 //ETX
124 
126 
128  unsigned short *GetValueRange()
129  { return this->RealSuperclass::GetValueRange(0); }
130 //BTX
131  void GetValueRange(unsigned short range[2])
132  { this->RealSuperclass::GetValueRange(range, 0); }
133 //ETX
135 
137  static unsigned short GetDataTypeValueMin() { return VTK_UNSIGNED_SHORT_MIN; }
138 
140  static unsigned short GetDataTypeValueMax() { return VTK_UNSIGNED_SHORT_MAX; }
141 
143 
146  unsigned short* WritePointer(vtkIdType id, vtkIdType number)
147  { return this->RealSuperclass::WritePointer(id, number); }
149 
151 
153  unsigned short* GetPointer(vtkIdType id)
154  { return this->RealSuperclass::GetPointer(id); }
156 
158 
164  void SetArray(unsigned short* array, vtkIdType size, int save)
165  { this->RealSuperclass::SetArray(array, size, save); }
166  void SetArray(unsigned short* array, vtkIdType size, int save, int deleteMethod)
167  { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
169 
170 protected:
171  vtkUnsignedShortArray(vtkIdType numComp=1);
173 
174 private:
175  //BTX
176  typedef vtkDataArrayTemplate<unsigned short> RealSuperclass;
177  //ETX
178  vtkUnsignedShortArray(const vtkUnsignedShortArray&); // Not implemented.
179  void operator=(const vtkUnsignedShortArray&); // Not implemented.
180 };
181 
182 #endif
void InsertValue(vtkIdType id, unsigned short f)
static unsigned short GetDataTypeValueMin()
Implementation template for vtkDataArray.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
unsigned short * GetValueRange(int comp)
unsigned short * GetValueRange()
#define VTK_UNSIGNED_SHORT_MAX
Definition: vtkType.h:129
int vtkIdType
Definition: vtkType.h:268
void SetValue(vtkIdType id, unsigned short value)
void GetValueRange(unsigned short range[2], int comp)
void SetArray(unsigned short *array, vtkIdType size, int save, int deleteMethod)
vtkIdType InsertNextTupleValue(const unsigned short *tuple)
void SetTupleValue(vtkIdType i, const unsigned short *tuple)
a simple class to control print indentation
Definition: vtkIndent.h:38
unsigned short * WritePointer(vtkIdType id, vtkIdType number)
unsigned short * GetPointer(vtkIdType id)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
unsigned short GetValue(vtkIdType id)
void SetArray(unsigned short *array, vtkIdType size, int save)
void InsertTupleValue(vtkIdType i, const unsigned short *tuple)
static unsigned short GetDataTypeValueMax()
#define VTK_UNSIGNED_SHORT_MIN
Definition: vtkType.h:128
void SetNumberOfValues(vtkIdType number)
vtkIdType InsertNextValue(unsigned short f)
void GetValueRange(unsigned short range[2])
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
void GetTupleValue(vtkIdType i, unsigned short *tuple)
dynamic, self-adjusting array of unsigned short