Avro C++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Classes | Namespaces | Macros
AvroTraits.hh File Reference

Define an is_serializable trait for types we can serialize natively. More...

#include "Config.hh"
#include "Boost.hh"
#include "Types.hh"

Go to the source code of this file.

Classes

struct  avro::is_serializable< T >
 
struct  avro::is_promotable< T >
 
struct  avro::type_to_avro< T >
 

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

Define an is_serializable trait for types we can serialize natively.

New types will need to define the trait as well.

Macro Definition Documentation

#define DEFINE_PRIMITIVE (   CTYPE,
  AVROTYPE 
)
Value:
template <> \
struct is_serializable<CTYPE> : public boost::true_type{}; \
\
template <> \
struct type_to_avro<CTYPE> { \
static const Type type = AVROTYPE; \
};
Type
The "type" for the schema.
Definition: Types.hh:31
Definition: Boost.hh:50
#define DEFINE_PROMOTABLE_PRIMITIVE (   CTYPE,
  AVROTYPE 
)
Value:
template <> \
struct is_promotable<CTYPE> : public boost::true_type{}; \
\
DEFINE_PRIMITIVE(CTYPE, AVROTYPE)
Definition: Boost.hh:50