vtkTypeUInt32Array.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
3 // .NAME vtkTypeUInt32Array - dynamic, self-adjusting array of vtkTypeUInt32
4 // .SECTION Description
5 // vtkTypeUInt32Array is an array of values of type vtkTypeUInt32. It
6 // provides methods for insertion and retrieval of values and will
7 // automatically resize itself to hold new data.
8 //
9 // This array should be preferred for data of type UInt32 as this
10 // array will use the correct underlying datatype based on the desired number of bits
11 // and the current platform. The superclass of this type will change depending on the
12 // machine and compiler in use so that the data contained always uses the proper type.
13 
14 #ifndef vtkTypeUInt32Array_h
15 #define vtkTypeUInt32Array_h
16 
17 #include "vtkCommonCoreModule.h" // For export macro
18 #include "vtkType.h" // For native type selections.
19 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20 
21 #if VTK_TYPE_UINT32 == VTK_UNSIGNED_INT
22 # include "vtkUnsignedIntArray.h"
23 # define vtkTypeArrayBase vtkUnsignedIntArray
24 #endif
25 
26 
28 
30 {
31 public:
32  static vtkTypeUInt32Array* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
36  // Description:
37  // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
39  {
40  return static_cast<vtkTypeUInt32Array*>(Superclass::FastDownCast(source));
41  }
42 
43 protected:
45  ~vtkTypeUInt32Array() override;
46 
47 private:
48  vtkTypeUInt32Array(const vtkTypeUInt32Array&) = delete;
49  void operator=(const vtkTypeUInt32Array&) = delete;
50 };
51 
52 // Define vtkArrayDownCast implementation:
54 
56 
57 #undef vtkTypeArrayBase
58 
59 #endif
60 /* VTK-HeaderTest-Exclude: INCLUDES */
#define VTKCOMMONCORE_EXPORT
vtkArrayDownCast_FastCastMacro(vtkTypeUInt32Array)
#define VTK_ABI_NAMESPACE_BEGIN
#define vtkTypeArrayBase
static vtkTypeUInt32Array * FastDownCast(vtkAbstractArray *source)