vtkTypeInt64Array.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 vtkTypeInt64Array - dynamic, self-adjusting array of vtkTypeInt64
4 // .SECTION Description
5 // vtkTypeInt64Array is an array of values of type vtkTypeInt64. 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 Int64 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 vtkTypeInt64Array_h
15 #define vtkTypeInt64Array_h
16 
17 #include "vtkCommonCoreModule.h" // For export macro
18 #include "vtkType.h" // For native type selections.
19 
20 #if VTK_TYPE_INT64 == VTK_LONG
21 # include "vtkLongArray.h"
22 # define vtkTypeArrayBase vtkLongArray
23 #elif VTK_TYPE_INT64 == VTK_LONG_LONG
24 # include "vtkLongLongArray.h"
25 # define vtkTypeArrayBase vtkLongLongArray
26 #endif
27 
28 
30 
32 {
33 public:
34  static vtkTypeInt64Array* New();
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38  // Description:
39  // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
41  {
42  return static_cast<vtkTypeInt64Array*>(Superclass::FastDownCast(source));
43  }
44 
45 protected:
47  ~vtkTypeInt64Array() override;
48 
49 private:
50  vtkTypeInt64Array(const vtkTypeInt64Array&) = delete;
51  void operator=(const vtkTypeInt64Array&) = delete;
52 };
53 
54 // Define vtkArrayDownCast implementation:
56 
58 
59 #undef vtkTypeArrayBase
60 
61 #endif
62 /* VTK-HeaderTest-Exclude: INCLUDES */
#define vtkTypeArrayBase
vtkArrayDownCast_FastCastMacro(vtkTypeInt64Array)
#define VTKCOMMONCORE_EXPORT
#define VTK_ABI_NAMESPACE_END
static vtkTypeInt64Array * FastDownCast(vtkAbstractArray *source)
#define VTK_ABI_NAMESPACE_BEGIN