VTK  9.7.20260828
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
37
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
45
46// Fake the superclass for non-Python wrappers.
47// Python can handle the templated superclass; Java and others cannot.
48#if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
49#define vtkDataArray vtkAOSDataArrayTemplate<short>
50#endif
51VTK_ABI_NAMESPACE_BEGIN
52class VTKCOMMONCORE_EXPORT VTK_MARSHALAUTO vtkShortArray : public vtkDataArray
53{
54public:
56#if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
57#undef vtkDataArray
58#endif
59 static vtkShortArray* New();
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
63 // This macro expands to the set of method declarations that
64 // make up the interface of vtkAOSDataArrayTemplate, which is ignored
65 // by the wrappers.
66#if (defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)) && !defined(__VTK_WRAP_PYTHON__)
68#endif
69
77
78protected:
80 ~vtkShortArray() override;
81
82private:
83 typedef vtkAOSDataArrayTemplate<short> RealSuperclass;
84
85 vtkShortArray(const vtkShortArray&) = delete;
86 void operator=(const vtkShortArray&) = delete;
87};
88
89// Define vtkArrayDownCast implementation:
91
92VTK_ABI_NAMESPACE_END
93#endif
Abstract superclass for all arrays.
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
a simple class to control print indentation
Definition vtkIndent.h:108
dynamic, self-adjusting array of short
~vtkShortArray() override
static vtkShortArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
static vtkShortArray * ExtendedNew()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkShortArray * New()
#define vtkCreateWrappedArrayInterface(T)
#define vtkArrayDownCast_FastCastMacro(ArrayT)
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define vtkDataArray
#define VTK_MARSHALAUTO