Reflection for RapidJSON  0.0.15
Reflection for serializing/deserializing with RapidJSON
Classes | Namespaces | Macros | Functions
serializable.h File Reference

Contains only the definiation of the JsonSerializable template class which makes the reflection accessible. The actual implementation is found in jsonreflector.h and generated files. More...

#include "./reflector.h"
#include <rapidjson/document.h>
#include <string>
Include dependency graph for serializable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ReflectiveRapidJSON::JsonSerializable< Type >
 The JsonSerializable class provides the CRTP-base for (de)serializable objects. More...
 

Namespaces

 ReflectiveRapidJSON
 

Macros

#define REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE(T)
 
#define REFLECTIVE_RAPIDJSON_PUSH_PRIVATE_MEMBERS(T)
 
#define REFLECTIVE_RAPIDJSON_PULL_PRIVATE_MEMBERS(T)
 
#define REFLECTIVE_RAPIDJSON_ENABLE_PRIVATE_MEMBERS(T)
 

Functions

template<typename Type , Traits::EnableIf< std::is_base_of< JsonSerializable< Type >, Type >> * = nullptr>
JsonSerializable< Type > & ReflectiveRapidJSON::as (Type &serializable)
 Helps to disambiguate when inheritance is used. More...
 
template<typename Type , Traits::EnableIf< std::is_base_of< JsonSerializable< Type >, Type >> * = nullptr>
const JsonSerializable< Type > & ReflectiveRapidJSON::as (const Type &serializable)
 Helps to disambiguate when inheritance is used. More...
 

Detailed Description

Contains only the definiation of the JsonSerializable template class which makes the reflection accessible. The actual implementation is found in jsonreflector.h and generated files.

Definition in file serializable.h.

Macro Definition Documentation

◆ REFLECTIVE_RAPIDJSON_ENABLE_PRIVATE_MEMBERS

#define REFLECTIVE_RAPIDJSON_ENABLE_PRIVATE_MEMBERS (   T)
Value:
REFLECTIVE_RAPIDJSON_PULL_PRIVATE_MEMBERS(T)

Definition at line 144 of file serializable.h.

◆ REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE

#define REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE (   T)
Value:
template <> struct ReflectiveRapidJSON::AdaptedJsonSerializable<T> : Traits::Bool<true> { \
}

Definition at line 119 of file serializable.h.

◆ REFLECTIVE_RAPIDJSON_PULL_PRIVATE_MEMBERS

#define REFLECTIVE_RAPIDJSON_PULL_PRIVATE_MEMBERS (   T)
Value:
friend void ::ReflectiveRapidJSON::JsonReflector::pull<T>(T & reflectable, \
const ::RAPIDJSON_NAMESPACE::GenericValue<::RAPIDJSON_NAMESPACE::UTF8<char>>::ConstObject &value, \

Definition at line 135 of file serializable.h.

◆ REFLECTIVE_RAPIDJSON_PUSH_PRIVATE_MEMBERS

#define REFLECTIVE_RAPIDJSON_PUSH_PRIVATE_MEMBERS (   T)
Value:
friend void ::ReflectiveRapidJSON::JsonReflector::push<T>( \
const T &reflectable, ::RAPIDJSON_NAMESPACE::Value::Object &value, ::RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator)

Definition at line 127 of file serializable.h.

ReflectiveRapidJSON::JsonDeserializationErrors
The JsonDeserializationErrors struct can be passed to fromJson() for error handling.
Definition: errorhandling.h:154
REFLECTIVE_RAPIDJSON_PUSH_PRIVATE_MEMBERS
#define REFLECTIVE_RAPIDJSON_PUSH_PRIVATE_MEMBERS(T)
Definition: serializable.h:126
ReflectiveRapidJSON::AdaptedJsonSerializable
The AdaptedJsonSerializable class allows considering 3rd party classes as serializable.
Definition: reflector.h:38