27#include <clang/Basic/Version.h>
28#include <clang/Frontend/CompilerInstance.h>
29#include <clang/Tooling/CompilationDatabase.h>
30#include <clang/Tooling/Tooling.h>
31#include <glob/glob.hpp>
54std::string render_name(std::string name);
62template <
typename ConfigType,
typename DiagramType>
67 DiagramType>::generator;
81 void generate(std::ostream &ostr)
const override;
101template <
typename DiagramModel,
typename DiagramConfig>
109template <
typename C,
typename D>
115 if (!config.allow_empty_diagrams() && model.is_empty()) {
117 "Diagram configuration resulted in empty diagram."};
121 j[
"name"] = model.name();
122 j[
"diagram_type"] =
to_string(model.type());
124 j[
"title"] = config.title();
129 generate_metadata(j);
134template <
typename C,
typename D>
138 parent[
"metadata"][
"clang_uml_version"] =
139 clanguml::version::CLANG_UML_VERSION;
140 parent[
"metadata"][
"schema_version"] =
141 clanguml::version::CLANG_UML_JSON_GENERATOR_SCHEMA_VERSION;
142 parent[
"metadata"][
"llvm_version"] = clang::getClangFullVersion();