VTK  9.5.20250718
vtkADIOS2CoreTypeTraits.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
7#ifndef vtkADIOS2CoreTypeTraits_h
8#define vtkADIOS2CoreTypeTraits_h
9
10#include "vtkType.h"
11
12#include "vtkIOADIOS2Module.h" // For export macro
13
14VTK_ABI_NAMESPACE_BEGIN
15template <typename T>
17{
18 static constexpr int VTKType = 0;
19};
20
21template <>
22struct NativeToVTKType<char>
23{
24 static constexpr int VTKType = VTK_CHAR;
25};
26
27template <>
28struct NativeToVTKType<float>
29{
30 static constexpr int VTKType = VTK_FLOAT;
31};
32
33template <>
34struct NativeToVTKType<double>
35{
36 static constexpr int VTKType = VTK_DOUBLE;
37};
38
39template <>
40struct NativeToVTKType<int8_t>
41{
42 static constexpr int VTKType = VTK_TYPE_INT8;
43};
44
45template <>
46struct NativeToVTKType<uint8_t>
47{
48 static constexpr int VTKType = VTK_TYPE_UINT8;
49};
50
51template <>
52struct NativeToVTKType<int16_t>
53{
54 static constexpr int VTKType = VTK_TYPE_INT16;
55};
56
57template <>
58struct NativeToVTKType<uint16_t>
59{
60 static constexpr int VTKType = VTK_TYPE_UINT16;
61};
62
63template <>
64struct NativeToVTKType<int32_t>
65{
66 static constexpr int VTKType = VTK_TYPE_INT32;
67};
68
69template <>
70struct NativeToVTKType<uint32_t>
71{
72 static constexpr int VTKType = VTK_TYPE_UINT32;
73};
74
75template <>
76struct NativeToVTKType<int64_t>
77{
78 static constexpr int VTKType = VTK_TYPE_INT64;
79};
80
81template <>
82struct NativeToVTKType<uint64_t>
83{
84 static constexpr int VTKType = VTK_TYPE_UINT64;
85};
86
87VTK_ABI_NAMESPACE_END
88#endif
89// 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:44
#define VTK_FLOAT
Definition vtkType.h:43
#define VTK_CHAR
Definition vtkType.h:34