VTK  9.7.1
vtkLongArray.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
20 #ifndef vtkLongArray_h
21 #define vtkLongArray_h
22 
23 #include "vtkAOSDataArrayTemplate.h" // Real Superclass
24 #include "vtkCommonCoreModule.h" // For export macro
25 #include "vtkDataArray.h"
26 
27 // Fake the superclass for non-Python wrappers.
28 // Python can handle the templated superclass; Java and others cannot.
29 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
30 #define vtkDataArray vtkAOSDataArrayTemplate<long>
31 #endif
32 VTK_ABI_NAMESPACE_BEGIN
33 class VTKCOMMONCORE_EXPORT vtkLongArray : public vtkDataArray
34 {
35 public:
36  vtkTypeMacro(vtkLongArray, vtkDataArray);
37 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
38 #undef vtkDataArray
39 #endif
40  static vtkLongArray* New();
41  static vtkLongArray* ExtendedNew();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  // This macro expands to the set of method declarations that
45  // make up the interface of vtkAOSDataArrayTemplate, which is ignored
46  // by the wrappers.
47 #if (defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)) && !defined(__VTK_WRAP_PYTHON__)
49 #endif
50 
55  {
56  return static_cast<vtkLongArray*>(Superclass::FastDownCast(source));
57  }
58 
59 protected:
60  vtkLongArray();
61  ~vtkLongArray() override;
62 
63 private:
64  typedef vtkAOSDataArrayTemplate<long> RealSuperclass;
65 
66  vtkLongArray(const vtkLongArray&) = delete;
67  void operator=(const vtkLongArray&) = delete;
68 };
69 
70 // Define vtkArrayDownCast implementation:
72 
73 VTK_ABI_NAMESPACE_END
74 #endif
dynamic, self-adjusting array of long
Definition: vtkLongArray.h:33
Abstract superclass for all arrays.
#define vtkCreateWrappedArrayInterface(T)
vtkArrayDownCast_FastCastMacro(vtkLongArray)
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 vtkLongArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkLongArray.h:54
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...