VTK  9.7.1
vtkFloatArray.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
18 #ifndef vtkFloatArray_h
19 #define vtkFloatArray_h
20 
21 #include "vtkAOSDataArrayTemplate.h" // Real Superclass
22 #include "vtkCommonCoreModule.h" // For export macro
23 #include "vtkDataArray.h"
24 
25 // Fake the superclass for non-Python wrappers.
26 // Python can handle the templated superclass; Java and others cannot.
27 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
28 #define vtkDataArray vtkAOSDataArrayTemplate<float>
29 #endif
30 VTK_ABI_NAMESPACE_BEGIN
31 class VTKCOMMONCORE_EXPORT vtkFloatArray : public vtkDataArray
32 {
33 public:
34  vtkTypeMacro(vtkFloatArray, vtkDataArray);
35 #if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_PYTHON__) || defined(__VTK_WRAP_HIERARCHY__)
36 #undef vtkDataArray
37 #endif
38 
39  static vtkFloatArray* New();
40  static vtkFloatArray* 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<vtkFloatArray*>(Superclass::FastDownCast(source));
56  }
57 
58 protected:
59  vtkFloatArray();
60  ~vtkFloatArray() override;
61 
62 private:
63  typedef vtkAOSDataArrayTemplate<float> RealSuperclass;
64 
65  vtkFloatArray(const vtkFloatArray&) = delete;
66  void operator=(const vtkFloatArray&) = delete;
67 };
68 
69 // Define vtkArrayDownCast implementation:
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
vtkArrayDownCast_FastCastMacro(vtkFloatArray)
Abstract superclass for all arrays.
#define vtkCreateWrappedArrayInterface(T)
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:31
static vtkFloatArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkFloatArray.h:53
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...