VTK  9.3.0
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
28 #ifndef vtkShortArray_h
29 #define vtkShortArray_h
30 
31 #include "vtkAOSDataArrayTemplate.h" // Real Superclass
32 #include "vtkCommonCoreModule.h" // For export macro
33 #include "vtkDataArray.h"
34 
35 // Fake the superclass for the wrappers.
36 #ifndef __VTK_WRAP__
37 #define vtkDataArray vtkAOSDataArrayTemplate<short>
38 #endif
39 VTK_ABI_NAMESPACE_BEGIN
40 class VTKCOMMONCORE_EXPORT vtkShortArray : public vtkDataArray
41 {
42 public:
43  vtkTypeMacro(vtkShortArray, vtkDataArray);
44 #ifndef __VTK_WRAP__
45 #undef vtkDataArray
46 #endif
47  static vtkShortArray* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
51  // This macro expands to the set of method declarations that
52  // make up the interface of vtkAOSDataArrayTemplate, which is ignored
53  // by the wrappers.
54 #if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)
56 #endif
57 
62  {
63  return static_cast<vtkShortArray*>(Superclass::FastDownCast(source));
64  }
65 
69  static short GetDataTypeValueMin() { return VTK_SHORT_MIN; }
70 
74  static short GetDataTypeValueMax() { return VTK_SHORT_MAX; }
75 
76 protected:
78  ~vtkShortArray() override;
79 
80 private:
82 
83  vtkShortArray(const vtkShortArray&) = delete;
84  void operator=(const vtkShortArray&) = delete;
85 };
86 
87 // Define vtkArrayDownCast implementation:
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
Abstract superclass for all arrays.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
a simple class to control print indentation
Definition: vtkIndent.h:38
dynamic, self-adjusting array of short
Definition: vtkShortArray.h:41
static vtkShortArray * ExtendedNew()
~vtkShortArray() override
static vtkShortArray * New()
static vtkShortArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkShortArray.h:61
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:69
static short GetDataTypeValueMax()
Get the maximum data value in its native type.
Definition: vtkShortArray.h:74
#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