|
Reflection for RapidJSON 0.0.17
Reflection for serializing/deserializing with RapidJSON
|
The JsonSerializationCodeGenerator class generates code for JSON (de)serialization of objects inheriting from an instantiation of JsonSerializable. More...
#include <jsonserializationcodegenerator.h>
Classes | |
| struct | Options |
Public Member Functions | |
| JsonSerializationCodeGenerator (CodeFactory &factory, const Options &options) | |
| void | generate (std::ostream &os) const override |
| Generates pull() and push() helper functions in the ReflectiveRapidJSON::JsonReflector namespace for the relevant classes. | |
| Public Member Functions inherited from ReflectiveRapidJSON::SerializationCodeGenerator | |
| SerializationCodeGenerator (CodeFactory &factory) | |
| void | addDeclaration (clang::Decl *decl) override |
| Adds all class declarations (to the internal member variable m_records). | |
| Public Member Functions inherited from ReflectiveRapidJSON::CodeGenerator | |
| CodeGenerator (CodeFactory &factory) | |
| virtual | ~CodeGenerator () |
Protected Member Functions | |
| void | computeRelevantClass (RelevantClass &possiblyRelevantClass) const override |
| Checks whether possiblyRelevantClass is actually relevant. | |
| Protected Member Functions inherited from ReflectiveRapidJSON::SerializationCodeGenerator | |
| std::vector< RelevantClass > | findRelevantClasses () const |
| Protected Member Functions inherited from ReflectiveRapidJSON::CodeGenerator | |
| CodeFactory & | factory () const |
| void | lazyInitializeSourceManager () const |
| Lazy initializes the source manager. | |
| bool | isOnlyIncluded (const clang::Decl *declaration) const |
| Returns whether the specified declaration is only included and not part of the actual file. | |
Protected Attributes | |
| const Options & | m_options |
| Protected Attributes inherited from ReflectiveRapidJSON::SerializationCodeGenerator | |
| const char * | m_qualifiedNameOfRecords |
| const char * | m_qualifiedNameOfAdaptionRecords |
Additional Inherited Members | |
| Public Types inherited from ReflectiveRapidJSON::SerializationCodeGenerator | |
| enum class | IsRelevant { Yes , No , Maybe } |
| Static Protected Member Functions inherited from ReflectiveRapidJSON::SerializationCodeGenerator | |
| static std::vector< const RelevantClass * > | findRelevantBaseClasses (const RelevantClass &relevantClass, const std::vector< RelevantClass > &relevantBases) |
| Static Protected Member Functions inherited from ReflectiveRapidJSON::CodeGenerator | |
| static clang::CXXBaseSpecifier * | inheritsFromInstantiationOf (clang::CXXRecordDecl *record, const char *templateClass) |
| Returns whether the specified record inherits from an instantiation of the specified templateClass. | |
The JsonSerializationCodeGenerator class generates code for JSON (de)serialization of objects inheriting from an instantiation of JsonSerializable.
Definition at line 14 of file jsonserializationcodegenerator.h.
| ReflectiveRapidJSON::JsonSerializationCodeGenerator::JsonSerializationCodeGenerator | ( | CodeFactory & | factory, |
| const Options & | options ) |
Definition at line 29 of file jsonserializationcodegenerator.cpp.
|
overrideprotectedvirtual |
Checks whether possiblyRelevantClass is actually relevant.
Reimplemented from ReflectiveRapidJSON::SerializationCodeGenerator.
Definition at line 40 of file jsonserializationcodegenerator.cpp.
|
overridevirtual |
Generates pull() and push() helper functions in the ReflectiveRapidJSON::JsonReflector namespace for the relevant classes.
Implements ReflectiveRapidJSON::CodeGenerator.
Definition at line 62 of file jsonserializationcodegenerator.cpp.
|
protected |
Definition at line 32 of file jsonserializationcodegenerator.h.