VTK: Common/Core/vtkCharArray.h Source File

| VTK 9.3.1

vtkCharArray.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 #ifndef vtkCharArray_h
38 #define vtkCharArray_h
39
40 #include "vtkAOSDataArrayTemplate.h" // Real Superclass
41 #include "vtkCommonCoreModule.h" // For export macro
42 #include "vtkDataArray.h"
43
44 // Fake the superclass for the wrappers.
45 #ifndef __VTK_WRAP__
46 #define vtkDataArray vtkAOSDataArrayTemplate<char>
47 #endif
48 VTK_ABI_NAMESPACE_BEGIN
49 class VTKCOMMONCORE_EXPORT vtkCharArray : public vtkDataArray
50 {
51 public:
52 vtkTypeMacro(vtkCharArray, vtkDataArray);
53 #ifndef __VTK_WRAP__
54 #undef vtkDataArray
55 #endif
56 static vtkCharArray* New();
57 static vtkCharArray* ExtendedNew();
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
60 // This macro expands to the set of method declarations that
61 // make up the interface of vtkAOSDataArrayTemplate, which is ignored
62 // by the wrappers.
63 #if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML__)
64 vtkCreateWrappedArrayInterface(char);
65 #endif
66
70 static vtkCharArray* FastDownCast(vtkAbstractArray* source)
71 {
72 return static_cast<vtkCharArray*>(Superclass::FastDownCast(source));
73 }
74
78 static char GetDataTypeValueMin() { return VTK_CHAR_MIN; }
79
83 static char GetDataTypeValueMax() { return VTK_CHAR_MAX; }
84
85 protected:
86 vtkCharArray();
87 ~vtkCharArray() override;
88
89 private:
90 typedef vtkAOSDataArrayTemplate<char> RealSuperclass;
91
92 vtkCharArray(const vtkCharArray&) = delete;
93 void operator=(const vtkCharArray&) = delete;
94 };
95
96 // Define vtkArrayDownCast implementation:
97 vtkArrayDownCast_FastCastMacro(vtkCharArray);
98
99 VTK_ABI_NAMESPACE_END
100 #endif
vtkAOSDataArrayTemplate< char >
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkCharArray
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:50
vtkCharArray::New
static vtkCharArray * New()
vtkCharArray::vtkCharArray
vtkCharArray()
vtkCharArray::ExtendedNew
static vtkCharArray * ExtendedNew()
vtkCharArray::GetDataTypeValueMin
static char GetDataTypeValueMin()
Get the minimum data value in its native type.
Definition: vtkCharArray.h:78
vtkCharArray::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCharArray::~vtkCharArray
~vtkCharArray() override
vtkCharArray::GetDataTypeValueMax
static char GetDataTypeValueMax()
Get the maximum data value in its native type.
Definition: vtkCharArray.h:83
vtkCharArray::FastDownCast
static vtkCharArray * FastDownCast(vtkAbstractArray *source)
A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
Definition: vtkCharArray.h:70
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkAOSDataArrayTemplate.h
vtkCreateWrappedArrayInterface
#define vtkCreateWrappedArrayInterface(T)
Definition: vtkAOSDataArrayTemplate.h:298
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:964
vtkArrayDownCast_FastCastMacro
vtkArrayDownCast_FastCastMacro(vtkCharArray)
vtkDataArray.h
VTK_CHAR_MIN
#define VTK_CHAR_MIN
Definition: vtkType.h:132
VTK_CHAR_MAX
#define VTK_CHAR_MAX
Definition: vtkType.h:133