From 282a3a1fb60946424e91a5b898525917770c8fb3 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 12 Jan 2018 15:28:37 +0100 Subject: [PATCH] Add architecture diagram --- README.md | 9 + doc/arch.graphml | 778 +++++++++++++++++++++++++++++++++++++++++++++++ doc/arch.svg | 297 ++++++++++++++++++ 3 files changed, 1084 insertions(+) create mode 100644 doc/arch.graphml create mode 100644 doc/arch.svg diff --git a/README.md b/README.md index 884ecd9..e7b45da 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,15 @@ An example for such custom (de)serialization can be found in the file Checkout the test cases for further examples. Relevant files are in the directories `lib/tests` and `generator/tests`. +## Architecture +The following diagram gives an overview about the architecture of the code generator and wrapper library +around RapidJSON: + +![Architectue overview](/doc/arch.svg) + +* blue: classes from LibTooling/Clang +* grey: conceivable extension or use + ## Install instructions ### Dependencies diff --git a/doc/arch.graphml b/doc/arch.graphml new file mode 100644 index 0000000..efe99e3 --- /dev/null +++ b/doc/arch.graphml @@ -0,0 +1,778 @@ + + + + + + + + + + + + + + + + + + + + + + + Library + + + + + + + + + + + + + + + + + + Helper functions + + + + + + + in namespace +JsonReflector + + + + + + + + + + + + + + + + Code generator + + + + + + + + + + + + + + + + + + CodeFactory + + + + + + + + + addDeclaration() +generate() + + + + + + + + + + + + CodeGenerator + + + + + + + + + addDeclaration() +generate() + + + + + + + + + + + + JsonSerializationCodeGenerator + + + + + + + + + + + + + + + + + + + + + FooCodeGenerator + + + + + + + + .... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + clang::tooling::ToolInvocation + + + + + + + + + + + + + + + + + + + + + FrontendAction + + + + + + + + + + + + + + + + + + + + + clang::ASTFrontendAction + + + + + + + + + + + + + + + + + + + + + Consumer + + + + + + + + + + + + + + + + + + + + + clang::ASTConsumer + + + + + + + + + + + + + + + + + + + + + Visitor + + + + + + + + + + + + + + + + + + + + + clang::RecursiveASTVisitor<Visitor> + + + + + + + + + + + + + + + + + + + + + + + + + + + + main() + + + + + + + + + + + + + + + + + JsonSerializable<T> + + + + + + + + + toJson() +fromJson() + + + + + + + + + + + + FooStruct + + + + + + + + .... + + + + + + + + + + + asedfasdfasdfasdfasdfasdfasd + + + + + + + + + + + + + + + + + + + + + + + + BarStruct + + + + + + + + .... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pull() + + + + + + + + + + + + + + + + RapidJSON + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CRTP inheritance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CRTP inheritance + + + + + + + + + + + + + uses + + + + + + + + + + + + + + + + + + + + + + + + + + generates + + + + + + + + + + + + + use + + + + + + + + + + diff --git a/doc/arch.svg b/doc/arch.svg new file mode 100644 index 0000000..e10a7f2 --- /dev/null +++ b/doc/arch.svg @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Library + + + Helper functions + in namespace + JsonReflector + + + + + + Code generator + + + + + + + CodeFactory + + + addDeclaration() + generate() + + + + + + + <<abstract>> + CodeGenerator + + + addDeclaration() + generate() + + + + + + + JsonSerializationCodeGenerator + + + + + + + FooCodeGenerator + + + + + + + clang::tooling::ToolInvocation + + + + + + + FrontendAction + + + + + + + clang::ASTFrontendAction + + + + + + + Consumer + + + + + + + clang::ASTConsumer + + + + + + + Visitor + + + + + + + clang::RecursiveASTVisitor<Visitor> + + + + + + + main() + + + + + + + <<abstract>> + JsonSerializable<T> + + + toJson() + fromJson() + + + + + + + FooStruct + + + + + + + BarStruct + + + + + + + + + + + + + + + + + + + pull() + + + + + + + RapidJSON + + + + + + + + + + generates + + + + + + + + + + + + + + + + + + + + + + + + + CRTP inheritance + + + + + + + uses + + + + + + + CRTP inheritance + + + + use + + +