Avro C++

Classes | Namespaces | Macros
AvroTraits.hh File Reference
`#include "Config.hh"`
`#include "Types.hh"`
`#include <cstdint>`
`#include <type_traits>`

Go to the source code of this file.

## Classes
struct | avro::is_serializable< T >
| Define an is_serializable trait for types we can serialize natively. More...
struct | avro::is_promotable< T >
struct | avro::type_to_avro< T >
struct | avro::is_defined< T >
| Check if a `T` is a complete type i.e. More...
struct | avro::is_not_defined< T >
| Similar to is_defined, but used to check if T is not defined. More...

## Namespaces
| avro
| A bunch of templates and specializations for encoding and decoding specific types.

## Macros
#define | DEFINE_PRIMITIVE(CTYPE, AVROTYPE)
#define | DEFINE_PROMOTABLE_PRIMITIVE(CTYPE, AVROTYPE)

## Detailed Description

This header contains type traits and similar utilities used by the library.

## Macro Definition Documentation

## ◆ DEFINE_PRIMITIVE

#define DEFINE_PRIMITIVE | ( |  | CTYPE,
|  |  | AVROTYPE
| ) |  |

Value:
template<> \
struct is_serializable<CTYPE> : public std::true_type {}; \
\
template<> \
struct type_to_avro<CTYPE> { \
static const Type type = AVROTYPE; \
};

## ◆ DEFINE_PROMOTABLE_PRIMITIVE

#define DEFINE_PROMOTABLE_PRIMITIVE | ( |  | CTYPE,
|  |  | AVROTYPE
| ) |  |

Value:
template<> \
struct is_promotable<CTYPE> : public std::true_type {}; \
\
DEFINE_PRIMITIVE(CTYPE, AVROTYPE)
avro::Type
Type
The "type" for the schema.
Definition: Types.hh:31