Reflection for RapidJSON 0.0.17
Reflection for serializing/deserializing with RapidJSON
Loading...
Searching...
No Matches
binaryserializationcodegenerator.h
Go to the documentation of this file.
1#ifndef REFLECTIVE_RAPIDJSON_CODE_BINARY_SERIALIZATION_GENERATOR_H
2#define REFLECTIVE_RAPIDJSON_CODE_BINARY_SERIALIZATION_GENERATOR_H
3
5
6#include <c++utilities/application/argumentparser.h>
7
8namespace ReflectiveRapidJSON {
9
15public:
16 struct Options {
17 Options();
18 Options(const Options &other) = delete;
19 void appendTo(CppUtilities::Argument *arg);
20
21 CppUtilities::ConfigValueArgument additionalClassesArg;
22 CppUtilities::ConfigValueArgument visibilityArg;
23 };
24
26
27 void generate(std::ostream &os) const override;
28
29protected:
30 void computeRelevantClass(RelevantClass &possiblyRelevantClass) const override;
31
33};
34
35inline void BinarySerializationCodeGenerator::Options::appendTo(CppUtilities::Argument *arg)
36{
37 arg->addSubArgument(&additionalClassesArg);
38 arg->addSubArgument(&visibilityArg);
39}
40
41} // namespace ReflectiveRapidJSON
42
43#endif // REFLECTIVE_RAPIDJSON_CODE_BINARY_SERIALIZATION_GENERATOR_H
void computeRelevantClass(RelevantClass &possiblyRelevantClass) const override
Checks whether possiblyRelevantClass is actually relevant.
void generate(std::ostream &os) const override
Generates pull() and push() helper functions in the ReflectiveRapidJSON::BinaryReflector namespace fo...
BinarySerializationCodeGenerator(CodeFactory &factory, const Options &options)
The CodeFactory class produces additional (reflection) code for a specified list of C++ source files.
Definition codefactory.h:27
Options()
Initializes the CLI arguments which are specific to the BinarySerializationCodeGenerator.