VTK  9.3.20240418
vtkShortArray.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
38 #ifndef vtkShortArray_h
39 #define vtkShortArray_h
40 
41 #include "vtkAOSDataArrayTemplate.h" // Real Superclass
42 #include "vtkCommonCoreModule.h" // For export macro
43 #include "vtkDataArray.h"
44 
45 // Fake the superclass for the wrappers.
46 #ifndef __VTK_WRAP__
47 #define vtkDataArray vtkAOSDataArrayTemplate<short>
48 #endif
49 VTK_ABI_NAMESPACE_BEGIN
50 class VTKCOMMONCORE_EXPORT vtkShortArray : public vtkDataArray
51 {
52 public:
53  vtkTypeMacro(vtkShortArray, vtkDataArray);
54 #ifndef __VTK_WRAP__
55 #undef vtkDataArray
56 #endif
57  static vtkShortArray* New();
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  // This macro expands to the set of method declarations that
62  // make up the interface of vtkAOSDataArrayTemplate, which is ignored
63  // by the wrappers.
64 #if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)
66 #endif
67 
72  {
73  return static_cast<vtkShortArray*>(Superclass::FastDownCast(source));
74  }
75 
79  static short GetDataTypeValueMin() { return VTK_SHORT_MIN; }
80 
84  static short GetDataTypeValueMax() { return VTK_SHORT_MAX; }
85 
86 protected:
88  ~vtkShortArray() override;
89 
90 private:
92 
93  vtkShortArray(const vtkShortArray&) = delete;
94  void operator=(const vtkShortArray&) = delete;
95 };
96 
97 // Define vtkArrayDownCast implementation:
99 
100 VTK_ABI_NAMESPACE_END
101 #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 short
Definition: vtkShortArray.h:51
static vtkShortArray * ExtendedNew()
~vtkShortArray() override
static vtkShortArray * New()
static vtkShortArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkShortArray.h:71
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static short GetDataTypeValueMin()
Get the minimum data value in its native type.
Definition: vtkShortArray.h:79
static short GetDataTypeValueMax()
Get the maximum data value in its native type.
Definition: vtkShortArray.h:84
#define vtkCreateWrappedArrayInterface(T)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkArrayDownCast_FastCastMacro(vtkShortArray)
#define VTK_SHORT_MAX
Definition: vtkType.h:140
#define VTK_SHORT_MIN
Definition: vtkType.h:139