|
Reflection for RapidJSON 0.0.17
Reflection for serializing/deserializing with RapidJSON
|
The CodeFactory class produces additional (reflection) code for a specified list of C++ source files. More...
#include <codefactory.h>
Classes | |
| struct | ToolInvocation |
Public Member Functions | |
| CodeFactory (std::string_view applicationPath, const std::vector< const char * > &sourceFiles, const std::vector< std::string_view > &clangOptions, std::ostream &os) | |
| Constructs a new instance. | |
| ~CodeFactory () | |
| const std::vector< std::unique_ptr< CodeGenerator > > & | generators () const |
| Returns the added generators. | |
| template<typename GeneratorType, typename... Args> | |
| void | addGenerator (Args &&...args) |
| Instantiates a code generator of the specified type and adds it to the current instance. | |
| template<typename GeneratorType, typename... Args> | |
| auto | bindGenerator (Args &&...args) |
| Returns a function which instantiates a code generator of the specified type and adds it to the current instance. | |
| bool | run () |
| Reads (relevant) AST elements using Clang and generates code. | |
| clang::CompilerInstance * | compilerInstance () |
| Returns the compiler instance. | |
| void | setCompilerInstance (clang::CompilerInstance *compilerInstance) |
| Assigns the compiler instance. | |
| bool | isErrorResilient () const |
| Returns whether most errors will be turned into warnings (by default false). | |
| void | setErrorResilient (bool errorResilient) |
| Sets whether most errors will be turned into warnings (by default false). | |
Friends | |
| class | Consumer |
| class | Visitor |
The CodeFactory class produces additional (reflection) code for a specified list of C++ source files.
Definition at line 27 of file codefactory.h.
| ReflectiveRapidJSON::CodeFactory::CodeFactory | ( | std::string_view | applicationPath, |
| const std::vector< const char * > & | sourceFiles, | ||
| const std::vector< std::string_view > & | clangOptions, | ||
| std::ostream & | os ) |
Constructs a new instance.
Definition at line 35 of file codefactory.cpp.
| ReflectiveRapidJSON::CodeFactory::~CodeFactory | ( | ) |
Definition at line 46 of file codefactory.cpp.
| void ReflectiveRapidJSON::CodeFactory::addGenerator | ( | Args &&... | args | ) |
Instantiates a code generator of the specified type and adds it to the current instance.
Definition at line 67 of file codefactory.h.
| auto ReflectiveRapidJSON::CodeFactory::bindGenerator | ( | Args &&... | args | ) |
Returns a function which instantiates a code generator of the specified type and adds it to the current instance.
Definition at line 104 of file codefactory.h.
|
inline |
Returns the compiler instance.
Definition at line 121 of file codefactory.h.
|
inline |
Returns the added generators.
Definition at line 112 of file codefactory.h.
|
inline |
Returns whether most errors will be turned into warnings (by default false).
Definition at line 138 of file codefactory.h.
| bool ReflectiveRapidJSON::CodeFactory::run | ( | ) |
Reads (relevant) AST elements using Clang and generates code.
Definition at line 90 of file codefactory.cpp.
|
inline |
Assigns the compiler instance.
Definition at line 130 of file codefactory.h.
|
inline |
Sets whether most errors will be turned into warnings (by default false).
Definition at line 146 of file codefactory.h.
|
friend |
Definition at line 28 of file codefactory.h.
|
friend |
Definition at line 29 of file codefactory.h.