VTK  9.1.0
vtkADIOS2CoreTypeTraits.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkADIOS2CoreImageReader.h
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=========================================================================*/
19#ifndef vtkADIOS2CoreTypeTraits_h
20#define vtkADIOS2CoreTypeTraits_h
21
22#include "vtkType.h"
23
24#include "vtkIOADIOS2Module.h" // For export macro
25
26template <typename T>
28{
29 static constexpr int VTKType = 0;
30};
31
32template <>
33struct NativeToVTKType<char>
34{
35 static constexpr int VTKType = VTK_CHAR;
36};
37
38template <>
39struct NativeToVTKType<float>
40{
41 static constexpr int VTKType = VTK_FLOAT;
42};
43
44template <>
45struct NativeToVTKType<double>
46{
47 static constexpr int VTKType = VTK_DOUBLE;
48};
49
50template <>
51struct NativeToVTKType<int8_t>
52{
53 static constexpr int VTKType = VTK_TYPE_INT8;
54};
55
56template <>
57struct NativeToVTKType<uint8_t>
58{
59 static constexpr int VTKType = VTK_TYPE_UINT8;
60};
61
62template <>
63struct NativeToVTKType<int16_t>
64{
65 static constexpr int VTKType = VTK_TYPE_INT16;
66};
67
68template <>
69struct NativeToVTKType<uint16_t>
70{
71 static constexpr int VTKType = VTK_TYPE_UINT16;
72};
73
74template <>
75struct NativeToVTKType<int32_t>
76{
77 static constexpr int VTKType = VTK_TYPE_INT32;
78};
79
80template <>
81struct NativeToVTKType<uint32_t>
82{
83 static constexpr int VTKType = VTK_TYPE_UINT32;
84};
85
86template <>
87struct NativeToVTKType<int64_t>
88{
89 static constexpr int VTKType = VTK_TYPE_INT64;
90};
91
92template <>
93struct NativeToVTKType<uint64_t>
94{
95 static constexpr int VTKType = VTK_TYPE_UINT64;
96};
97
98#endif
99// VTK-HeaderTest-Exclude: vtkADIOS2CoreTypeTraits.h
Type traits for adios2 types(Native types) to vtk types.
static constexpr int VTKType
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_FLOAT
Definition: vtkType.h:54
#define VTK_CHAR
Definition: vtkType.h:45