From ae4f073cce9e84c4ea52779e1ab85c1a47ab2740 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 20 Mar 2022 23:41:59 +0100 Subject: [PATCH] Updated docs --- .clang-uml | 3 +++ README.md | 6 ++++++ docs/configuration_file.md | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/.clang-uml b/.clang-uml index af96bbc5..96cff715 100644 --- a/.clang-uml +++ b/.clang-uml @@ -1,5 +1,8 @@ compilation_database_dir: debug output_directory: docs/diagrams +generate_links: + link: "https://github.com/bkryza/clang-uml/blob/{{ git.commit }}/{{ element.source.path }}#L{{ element.source.line }}" + tooltip: "{{ element.name }}" diagrams: main_package: include!: uml/main_package_diagram.yml diff --git a/README.md b/README.md index d85fb2e1..2dc93fbb 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,12 @@ Main features supported so far include: * Relationship inference from C++ containers and smart pointers * Namespace based content filtering * Optional package generation from namespaces + * Interactive links to online code to classes, methods and class fields * Sequence diagram generation * Generation of sequence diagram from one code location to another (currently only for non-template code) * Package diagram generation * Generation of package diagram based on C++ namespaces + * Interactive links to online code to packages To see what `clang-uml` can do so far, checkout the diagrams generated for unit test cases [here](./docs/test_cases.md). @@ -164,6 +166,9 @@ generates the following diagram (via PlantUML): ![class_diagram_example](docs/test_cases/t00009_class.svg) +> Open the raw image [here](https://raw.githubusercontent.com/bkryza/clang-uml/master/docs/test_cases/t00009_class.svg), +> and checkout the hover tooltips and hyperlinks to classes and methods. + #### Default mappings | UML | C++ | @@ -342,6 +347,7 @@ This project relies on the following great tools: * [Catch2](https://github.com/catchorg/Catch2) - C++ unit test framework * [glob](https://github.com/p-ranav/glob) - Unix style path expansion for C++ * [CLI11](https://github.com/CLIUtils/CLI11) - command line parser for C++ + * [inja](https://github.com/pantor/inja) - a template engine for modern C++ ## LICENSE diff --git a/docs/configuration_file.md b/docs/configuration_file.md index 41d4bbb8..778a8200 100644 --- a/docs/configuration_file.md +++ b/docs/configuration_file.md @@ -37,6 +37,12 @@ compilation_database_dir: debug output_directory: docs/diagrams # Set this as default for all diagrams generate_method_arguments: none +# Enable generation of hyperlinks to diagram elements +generate_links: + # Link pattern + link: "https://github.com/bkryza/clang-uml/blob/{{ git.commit }}/{{ element.source.path }}#L{{ element.source.line }}" + # Tooltip pattern + tooltip: "{{ element.name }}" # The map of diagrams - keys are also diagram file names diagrams: main_package: