VTK  9.3.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 the wrappers.
26 #ifndef __VTK_WRAP__
27 #define vtkDataArray vtkAOSDataArrayTemplate<float>
28 #endif
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKCOMMONCORE_EXPORT vtkFloatArray : public vtkDataArray
31 {
32 public:
33  vtkTypeMacro(vtkFloatArray, vtkDataArray);
34 #ifndef __VTK_WRAP__
35 #undef vtkDataArray
36 #endif
37 
38  static vtkFloatArray* New();
39  static vtkFloatArray* ExtendedNew();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  // This macro expands to the set of method declarations that
43  // make up the interface of vtkAOSDataArrayTemplate, which is ignored
44  // by the wrappers.
45 #if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)
47 #endif
48 
53  {
54  return static_cast<vtkFloatArray*>(Superclass::FastDownCast(source));
55  }
56 
60  static float GetDataTypeValueMin() { return VTK_FLOAT_MIN; }
61 
65  static float GetDataTypeValueMax() { return VTK_FLOAT_MAX; }
66 
67 protected:
68  vtkFloatArray();
69  ~vtkFloatArray() override;
70 
71 private:
72  typedef vtkAOSDataArrayTemplate<float> RealSuperclass;
73 
74  vtkFloatArray(const vtkFloatArray&) = delete;
75  void operator=(const vtkFloatArray&) = delete;
76 };
77 
78 // Define vtkArrayDownCast implementation:
80 
81 VTK_ABI_NAMESPACE_END
82 #endif
vtkArrayDownCast_FastCastMacro(vtkFloatArray)
Abstract superclass for all arrays.
#define vtkCreateWrappedArrayInterface(T)
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:30
static vtkFloatArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkFloatArray.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static float GetDataTypeValueMax()
Get the maximum data value in its native type.
Definition: vtkFloatArray.h:65
#define VTK_FLOAT_MAX
Definition: vtkType.h:152
static float GetDataTypeValueMin()
Get the minimum data value in its native type.
Definition: vtkFloatArray.h:60
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...
#define VTK_FLOAT_MIN
Definition: vtkType.h:151