Traits.h File Reference
`#include <assert.h>`
`#include <string>`
`#include <hdf5.h>`
`#include "Log.h"`
`#include "Types.h"`
`#include "ns.h"`

Go to the source code of this file.

## Classes

struct | DataTypeTraits< T >
class | FieldTraits< Data_T >
struct | FieldTraits< C3f >
struct | FieldTraits< char >
struct | FieldTraits< double >
struct | FieldTraits< float >
struct | FieldTraits< half >
struct | FieldTraits< int >
struct | FieldTraits< unsigned char >
struct | FieldTraits< V3d >
struct | FieldTraits< V3f >
struct | FieldTraits< V3h >
struct | NestedFieldType< Field_T >
| Used to return a string for the name of a nested templated field. More...
struct | TemplatedFieldType< Field_T >
| Used to return a string for the name of a templated field. More...

## Macros

#define | FIELD3D_DECL_DATATYPENAME(typeName)

## Typedefs

typedef half | float16_t
typedef float | float32_t
typedef double | float64_t
typedef Field3D::M44d | mtx64_t
typedef Field3D::V3h | vec16_t
typedef Field3D::V3f | vec32_t
typedef Field3D::V3d | vec64_t
typedef Field3D::V3i | veci32_t

## Enumerations

enum | DataTypeEnum { DataTypeHalf =0 , DataTypeUnsignedChar , DataTypeInt , DataTypeFloat , DataTypeDouble , DataTypeVecHalf , DataTypeVecFloat , DataTypeVecDouble , DataTypeUnknown }
enum | OgDataType { F3DInt8 = 0 , F3DUint8 , F3DInt16 , F3DUint16 , F3DInt32 , F3DUint32 , F3DInt64 , F3DUint64 , F3DFloat16 , F3DFloat32 , F3DFloat64 , F3DVec16 , F3DVec32 , F3DVec64 , F3DVecI32 , F3DMtx64 , F3DString , F3DNumDataTypes , F3DInvalidDataType = 127 }
| Enumerates the various uses for Ogawa-level groups. More...

## Detailed Description

This file contains the DataTypeTraits struct, with class functions for converting templatization into strings and enums.

Definition in file Traits.h.

## Macro Definition Documentation

## FIELD3D_DECL_DATATYPENAME

#define FIELD3D_DECL_DATATYPENAME | ( |  | typeName | ) |

Value:
template<> \
inline std::string DataTypeTraits<typeName>::name() \
{ \
return std::string(#typeName); \
} \
DataTypeTraits::name
static std::string name()
Definition Traits.h:267

Definition at line 330 of file Traits.h.

#define FIELD3D_DECL_DATATYPENAME(typeName) \
template<> \
inline std::string DataTypeTraits<typeName>::name() \
{ \
return std::string(#typeName); \
} \

## Typedef Documentation

## float16_t

typedef half float16_t

Definition at line 86 of file Traits.h.

## float32_t

typedef float float32_t

Definition at line 87 of file Traits.h.

## float64_t

typedef double float64_t

Definition at line 88 of file Traits.h.

## vec16_t

typedef Field3D::V3h vec16_t

Definition at line 91 of file Traits.h.

## vec32_t

typedef Field3D::V3f vec32_t

Definition at line 92 of file Traits.h.

## vec64_t

typedef Field3D::V3d vec64_t

Definition at line 93 of file Traits.h.

## veci32_t

typedef Field3D::V3i veci32_t

Definition at line 94 of file Traits.h.

## mtx64_t

typedef Field3D::M44d mtx64_t

Definition at line 95 of file Traits.h.

## Enumeration Type Documentation

## DataTypeEnum

enum DataTypeEnum

Enumerator
DataTypeHalf |
DataTypeUnsignedChar |
DataTypeInt |
DataTypeFloat |
DataTypeDouble |
DataTypeVecHalf |
DataTypeVecFloat |
DataTypeVecDouble |
DataTypeUnknown |

Definition at line 108 of file Traits.h.

{
DataTypeHalf=0,
DataTypeUnsignedChar,
DataTypeInt,
DataTypeFloat,
DataTypeDouble,
DataTypeVecHalf,
DataTypeVecFloat,
DataTypeVecDouble,
DataTypeUnknown
};
DataTypeFloat
@ DataTypeFloat
Definition Traits.h:112
DataTypeHalf
@ DataTypeHalf
Definition Traits.h:109
DataTypeVecHalf
@ DataTypeVecHalf
Definition Traits.h:114
DataTypeUnsignedChar
@ DataTypeUnsignedChar
Definition Traits.h:110
DataTypeVecDouble
@ DataTypeVecDouble
Definition Traits.h:116
DataTypeUnknown
@ DataTypeUnknown
Definition Traits.h:117
DataTypeVecFloat
@ DataTypeVecFloat
Definition Traits.h:115
DataTypeInt
@ DataTypeInt
Definition Traits.h:111
DataTypeDouble
@ DataTypeDouble
Definition Traits.h:113

## OgDataType

enum OgDataType

Enumerates the various uses for Ogawa-level groups.

Warning
  Do not under any circumstances alter the order of these! If you need to add more types, append them at the end, before F3DNumDataTypes.

Enumerator
F3DInt8 |
F3DUint8 |
F3DInt16 |
F3DUint16 |
F3DInt32 |
F3DUint32 |
F3DInt64 |
F3DUint64 |
F3DFloat16 |
F3DFloat32 |
F3DFloat64 |
F3DVec16 |
F3DVec32 |
F3DVec64 |
F3DVecI32 |
F3DMtx64 |
F3DString |
F3DNumDataTypes |
F3DInvalidDataType |

Definition at line 125 of file Traits.h.

{
// Signed and unsigned integers from char to long
F3DInt8 = 0,
F3DUint8,
F3DInt16,
F3DUint16,
F3DInt32,
F3DUint32,
F3DInt64,
F3DUint64,
// Floats
F3DFloat16,
F3DFloat32,
F3DFloat64,
// Vec3
F3DVec16,
F3DVec32,
F3DVec64,
F3DVecI32,
// Matrix
F3DMtx64,
// String
F3DString,
F3DNumDataTypes,
// Invalid type enum
F3DInvalidDataType = 127
};
F3DInt64
@ F3DInt64
Definition Traits.h:137
F3DUint64
@ F3DUint64
Definition Traits.h:138
F3DFloat32
@ F3DFloat32
Definition Traits.h:142
F3DFloat64
@ F3DFloat64
Definition Traits.h:143
F3DVec64
@ F3DVec64
Definition Traits.h:148
F3DUint32
@ F3DUint32
Definition Traits.h:135
F3DInt16
@ F3DInt16
Definition Traits.h:131
F3DString
@ F3DString
Definition Traits.h:155
F3DVec32
@ F3DVec32
Definition Traits.h:147
F3DInt32
@ F3DInt32
Definition Traits.h:134
F3DUint16
@ F3DUint16
Definition Traits.h:132
F3DVecI32
@ F3DVecI32
Definition Traits.h:149
F3DFloat16
@ F3DFloat16
Definition Traits.h:141
F3DMtx64
@ F3DMtx64
Definition Traits.h:152
F3DNumDataTypes
@ F3DNumDataTypes
Definition Traits.h:157
F3DInt8
@ F3DInt8
Definition Traits.h:128
F3DInvalidDataType
@ F3DInvalidDataType
Definition Traits.h:160
F3DUint8
@ F3DUint8
Definition Traits.h:129
F3DVec16
@ F3DVec16
Definition Traits.h:146