vtkTypeUInt64Array.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTypedArray.h.in
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // .NAME vtkTypeUInt64Array - dynamic, self-adjusting array of vtkTypeUInt64
16 // .SECTION Description
17 // vtkTypeUInt64Array is an array of values of type vtkTypeUInt64. It
18 // provides methods for insertion and retrieval of values and will
19 // automatically resize itself to hold new data.
20 //
21 // This array should be preferred for data of type UInt64 as this
22 // array will use the correct underlying datatype based on the desired number of bits
23 // and the current platform. The superclass of this type will change depending on the
24 // machine and compiler in use so that the data contained always uses the proper type.
25 
26 #ifndef vtkTypeUInt64Array_h
27 #define vtkTypeUInt64Array_h
28 
29 #include "vtkCommonCoreModule.h" // For export macro
30 #include "vtkType.h" // For native type selections.
31 
32 #if VTK_TYPE_UINT64 == VTK_UNSIGNED_LONG
33 # include "vtkUnsignedLongArray.h"
34 # define vtkTypeArrayBase vtkUnsignedLongArray
35 #elif VTK_TYPE_UINT64 == VTK_UNSIGNED_LONG_LONG
37 # define vtkTypeArrayBase vtkUnsignedLongLongArray
38 #endif
39 
41 {
42 public:
43  static vtkTypeUInt64Array* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
47  // Description:
48  // A faster alternative to SafeDownCast for downcasting vtkAbstractArrays.
50  {
51  return static_cast<vtkTypeUInt64Array*>(Superclass::FastDownCast(source));
52  }
53 
54 protected:
56  ~vtkTypeUInt64Array() override;
57 
58 private:
59  vtkTypeUInt64Array(const vtkTypeUInt64Array&) = delete;
60  void operator=(const vtkTypeUInt64Array&) = delete;
61 };
62 
63 // Define vtkArrayDownCast implementation:
65 
66 #undef vtkTypeArrayBase
67 
68 #endif
vtkArrayDownCast_FastCastMacro(vtkTypeUInt64Array)
#define VTKCOMMONCORE_EXPORT
static vtkTypeUInt64Array * FastDownCast(vtkAbstractArray *source)
#define vtkTypeArrayBase