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