Reflection for RapidJSON  0.0.15
Reflection for serializing/deserializing with RapidJSON
Namespaces | Functions
reflector-boosthana.h File Reference

Contains generic functions relying on Boost.Hana which can replace the code which would otherwise had to be generated. More...

#include "./reflector.h"
#include <boost/hana/adapt_struct.hpp>
#include <boost/hana/at_key.hpp>
#include <boost/hana/define_struct.hpp>
#include <boost/hana/for_each.hpp>
#include <boost/hana/intersection.hpp>
#include <boost/hana/keys.hpp>
Include dependency graph for reflector-boosthana.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ReflectiveRapidJSON
 
 ReflectiveRapidJSON::BinaryReflector
 The BinaryReflector namespace contains BinaryReader and BinaryWriter for automatic binary (de)serialization.
 

Functions

template<typename Type , Traits::EnableIf< IsCustomType< Type >> * = nullptr>
void ReflectiveRapidJSON::BinaryReflector::readCustomType (BinaryDeserializer &deserializer, Type &customType)
 
template<typename Type , Traits::EnableIf< IsCustomType< Type >> * = nullptr>
void ReflectiveRapidJSON::BinaryReflector::writeCustomType (BinarySerializer &serializer, const Type &customType)
 

Detailed Description

Contains generic functions relying on Boost.Hana which can replace the code which would otherwise had to be generated.

Remarks
These functions use boost::hana::keys() and boost::hana::at_key() rather than the "plain" for-loop shown in the introspection examples of the Boost.Hana documentation. The reason is that the "plain" for-loop involves making copies. This costs performance and - more importantly - prevents modifying the actual object.

Definition in file reflector-boosthana.h.