VTK  9.7.1
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
19 #ifndef vtkShortArray_h
20 #define vtkShortArray_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 non-Python wrappers.
27 // Python can handle the templated superclass; Java and others cannot.
28 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
29 #define vtkDataArray vtkAOSDataArrayTemplate<short>
30 #endif
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKCOMMONCORE_EXPORT vtkShortArray : public vtkDataArray
33 {
34 public:
35  vtkTypeMacro(vtkShortArray, vtkDataArray);
36 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
37 #undef vtkDataArray
38 #endif
39  static vtkShortArray* New();
40  static vtkShortArray* ExtendedNew();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  // This macro expands to the set of method declarations that
44  // make up the interface of vtkAOSDataArrayTemplate, which is ignored
45  // by the wrappers.
46 #if (defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)) && !defined(__VTK_WRAP_PYTHON__)
48 #endif
49 
54  {
55  return static_cast<vtkShortArray*>(Superclass::FastDownCast(source));
56  }
57 
58 protected:
59  vtkShortArray();
60  ~vtkShortArray() override;
61 
62 private:
63  typedef vtkAOSDataArrayTemplate<short> RealSuperclass;
64 
65  vtkShortArray(const vtkShortArray&) = delete;
66  void operator=(const vtkShortArray&) = delete;
67 };
68 
69 // Define vtkArrayDownCast implementation:
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
dynamic, self-adjusting array of short
Definition: vtkShortArray.h:32
Abstract superclass for all arrays.
#define vtkCreateWrappedArrayInterface(T)
static vtkShortArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkShortArray.h:53
vtkArrayDownCast_FastCastMacro(vtkShortArray)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...