VTK  9.3.20240419
vtkUnsignedShortArray.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkUnsignedShortArray_h
20 #define vtkUnsignedShortArray_h
21 
22 #include "vtkAOSDataArrayTemplate.h" // Real Superclass
23 #include "vtkCommonCoreModule.h" // For export macro
24 #include "vtkDataArray.h"
25 
26 // Fake the superclass for the wrappers.
27 #ifndef __VTK_WRAP__
28 #define vtkDataArray vtkAOSDataArrayTemplate<unsigned short>
29 #endif
30 VTK_ABI_NAMESPACE_BEGIN
31 class VTKCOMMONCORE_EXPORT vtkUnsignedShortArray : public vtkDataArray
32 {
33 public:
35 #ifndef __VTK_WRAP__
36 #undef vtkDataArray
37 #endif
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  // This macro expands to the set of method declarations that
43  // make up the interface of vtkAOSDataArrayTemplate, which is ignored
44  // by the wrappers.
45 #if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)
46  vtkCreateWrappedArrayInterface(unsigned short);
47 #endif
48 
53  {
54  return static_cast<vtkUnsignedShortArray*>(Superclass::FastDownCast(source));
55  }
56 
60  static unsigned short GetDataTypeValueMin() { return VTK_UNSIGNED_SHORT_MIN; }
61 
65  static unsigned short GetDataTypeValueMax() { return VTK_UNSIGNED_SHORT_MAX; }
66 
67 protected:
70 
71 private:
73 
75  void operator=(const vtkUnsignedShortArray&) = delete;
76 };
77 
78 // Define vtkArrayDownCast implementation:
80 
81 VTK_ABI_NAMESPACE_END
82 #endif
Abstract superclass for all arrays.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:155
a simple class to control print indentation
Definition: vtkIndent.h:108
dynamic, self-adjusting array of unsigned short
~vtkUnsignedShortArray() override
static unsigned short GetDataTypeValueMax()
Get the maximum data value in its native type.
static vtkUnsignedShortArray * New()
static unsigned short GetDataTypeValueMin()
Get the minimum data value in its native type.
static vtkUnsignedShortArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
static vtkUnsignedShortArray * ExtendedNew()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define vtkCreateWrappedArrayInterface(T)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_UNSIGNED_SHORT_MAX
Definition: vtkType.h:142
#define VTK_UNSIGNED_SHORT_MIN
Definition: vtkType.h:141
vtkArrayDownCast_FastCastMacro(vtkUnsignedShortArray)