Skip to content

Commit fb348fb

Browse files
committed
Updated Doxygen docs
1 parent 6dd4089 commit fb348fb

21 files changed

+2981
-92
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ docs/diagrams
2525
docs/doxygen/html
2626
docs/doxygen/xml
2727
docs/doxygen/latex
28+
docs/contributing.md
29+
docs/changelog.md
2830

2931
coverage*.info
3032

CONTRIBUTING.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Contributing to `clang-uml`
1+
# Contributing to clang-uml
22

33
Thanks for taking interest in `clang-uml`!
44

5-
> Please, make sure you're ok with [Code of conduct](./CODE_OF_CONDUCT.md) and [LICENSE](./LICENSE.md)
5+
> Please, make sure you're ok with
6+
> [Code of conduct](./CODE_OF_CONDUCT.md)
7+
> and [LICENSE](./LICENSE.md)
68
79

810
## If you found a bug
@@ -18,12 +20,12 @@ Thanks for taking interest in `clang-uml`!
1820
the C++ code which triggers the issue, and in `tests/t00050/test_case.h` write the test checks.
1921
The test case must be also added manually to `tests/test_cases.cc`:
2022
```cpp
21-
...
23+
// ...
2224
#include "t00047/test_case.h"
2325
#include "t00048/test_case.h"
2426
#include "t00049/test_case.h"
25-
#include "t00050/test_case.h"
26-
...
27+
#include "t00050/test_case.h" // <<<
28+
// ...
2729
```
2830

2931
Finally, create an issue with a link to your branch with the new test case.
@@ -82,8 +84,8 @@ Thanks for taking interest in `clang-uml`!
8284
the feature to ensure we're on the same page as to its purpose and possible implementation
8385
* Next, implement the feature, please try to adapt to the overall code style:
8486
* 80-character line width
85-
* snakes over camels
86-
* use `make format` before submitting PR to ensure consistent formatting
87+
* snakes not camels
88+
* use `make format` before submitting PR to ensure consistent formatting (requires Docker)
8789
* use `make tidy` to check if your code doesn't introduce any `clang-tidy` warnings
8890
* Add test case (or multiple test cases), which cover the new feature
8991
* Finally, create a pull request!

Doxyfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PROJECT_NUMBER = 0.3.7
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = C++ UML diagram generator based on Clang
47+
PROJECT_BRIEF = C++ to UML diagram generator based on Clang
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55
@@ -781,7 +781,7 @@ FILE_VERSION_FILTER =
781781
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
782782
# tag is left empty.
783783

784-
LAYOUT_FILE =
784+
LAYOUT_FILE = docs/doxygen/layout-clang-uml.xml
785785

786786
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
787787
# the reference definitions. This must be a list of .bib files. The .bib
@@ -1013,7 +1013,9 @@ EXAMPLE_RECURSIVE = NO
10131013
# that contain images that are to be included in the documentation (see the
10141014
# \image command).
10151015

1016-
IMAGE_PATH = docs/diagrams
1016+
IMAGE_PATH = docs/img
1017+
IMAGE_PATH += docs/diagrams
1018+
IMAGE_PATH += docs/test_cases
10171019

10181020
# The INPUT_FILTER tag can be used to specify a program that doxygen should
10191021
# invoke to filter for each input file. Doxygen will invoke the filter program
@@ -1305,9 +1307,9 @@ HTML_EXTRA_FILES = thirdparty/doxygen-awesome-css/doxygen-awesome-interact
13051307
HTML_EXTRA_FILES += thirdparty/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
13061308
HTML_EXTRA_FILES += thirdparty/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js
13071309
HTML_EXTRA_FILES += thirdparty/doxygen-awesome-css/doxygen-awesome-tabs.js
1308-
HTML_EXTRA_FILES += CONTRIBUTING.md
13091310
HTML_EXTRA_FILES += docs/doxygen/highlight.min.js
1310-
HTML_EXTRA_FILES += docs/doxygen/solarized-light.min.css
1311+
HTML_EXTRA_FILES += docs/doxygen/github.min.css
1312+
HTML_EXTRA_FILES += docs/img/github-mark.svg
13111313

13121314
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
13131315
# will adjust the colors in the style sheet and background images according to

Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ docs:
139139
make -C docs toc
140140

141141
.PHONY: doxygen
142-
doxygen:
143-
doxygen
142+
doxygen: docs
143+
cp CONTRIBUTING.md docs/contributing.md
144+
cp CHANGELOG.md docs/changelog.md
145+
../doxygen/_build/bin/doxygen
144146

145147
.PHONY: fedora/%
146148
fedora/%:

docs/README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ legacy code. The configuration file or files for `clang-uml` define the
99
types and contents of each generated diagram.
1010
The diagrams can be generated in [PlantUML](https://plantuml.com) and JSON formats.
1111

12+
Example sequence diagram generated using `clang-uml` from [this code](https://github.com/bkryza/clang-uml/blob/master/tests/t20029/t20029.cc):
13+
![Sample sequence diagram](test_cases/t20029_sequence.svg)
14+
1215
`clang-uml` currently supports C++ up to version 17 with partial support for C++ 20.
1316

1417
To see what `clang-uml` can do, checkout the diagrams generated for unit
1518
test cases [here](./test_cases.md) or examples in
1619
[clang-uml-examples](https://github.com/bkryza/clang-uml-examples) repository.
1720

21+
These pages provide both user and developer documentation.
22+
1823
* [Quick start](./quick_start.md)
1924
* [Installation](./installation.md)
20-
* Generating diagrams
25+
* **Generating diagrams**
2126
* [Common options](./common_options.md)
2227
* [Generator types](./generator_types.md)
2328
* [Class diagrams](./class_diagrams.md)
@@ -33,6 +38,8 @@ test cases [here](./test_cases.md) or examples in
3338
* [Doxygen integration](./doxygen_integration.md)
3439
* [Test cases documentation](./test_cases.md)
3540
* [Troubleshooting](./troubleshooting.md)
36-
* Development
41+
* [Changelog](./changelog.md)
42+
* [License](./license.md)
43+
* **Development**
3744
* [Architecture](./architecture.md)
38-
* [Contributing](../CONTRIBUTING.md)
45+
* [Contributing](./contributing.md)

docs/architecture.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Architecture
2+

docs/comment_decorators.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<!-- toc -->
44

5-
* [`note`](#note)
6-
* [`skip` and `skiprelationship`](#skip-and-skiprelationship)
7-
* [`composition`, `association` and `aggregation`](#composition-association-and-aggregation)
8-
* [`style`](#style)
5+
* ['note'](#note)
6+
* ['skip' and 'skiprelationship'](#skip-and-skiprelationship)
7+
* ['composition', 'association' and 'aggregation'](#composition-association-and-aggregation)
8+
* ['style'](#style)
99

1010
<!-- tocstop -->
1111

@@ -27,7 +27,7 @@ The optional `:<diagram_name>` suffix will apply this decorator only to a specif
2727

2828
Currently, the following decorators are supported.
2929

30-
## `note`
30+
## 'note'
3131

3232
This decorator allows to specify directly in the code comments that should be included in the generated diagrams.
3333

@@ -91,7 +91,7 @@ generates the following class diagram:
9191
9292
![note](./test_cases/t00028_class.svg)
9393
94-
## `skip` and `skiprelationship`
94+
## 'skip' and 'skiprelationship'
9595
This decorator allows to skip the specific classes or methods from the diagrams, for instance the following code:
9696
```cpp
9797
@@ -145,7 +145,7 @@ generates the following diagram:
145145

146146
![skip](./test_cases/t00029_class.svg)
147147

148-
## `composition`, `association` and `aggregation`
148+
## 'composition', 'association' and 'aggregation'
149149

150150
These decorators allow to specify explicitly the type of relationship within a class diagram that should be
151151
generated for a given class member. For instance the following code:
@@ -190,7 +190,7 @@ generates the following diagram:
190190
![skip](./test_cases/t00030_class.svg)
191191

192192

193-
## `style`
193+
## 'style'
194194
This decorator allows to specify in the code specific styles for diagram elements, for instance:
195195

196196
```cpp

docs/common_options.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* [PlantUML custom directives](#plantuml-custom-directives)
88
* [Adding debug information in the generated diagrams](#adding-debug-information-in-the-generated-diagrams)
99
* [Resolving include path and compiler flags issues](#resolving-include-path-and-compiler-flags-issues)
10-
* [Use `--query-driver` command line option](#use---query-driver-command-line-option)
10+
* [Use '--query-driver' command line option](#use---query-driver-command-line-option)
1111
* [Manually add and remove compile flags from the compilation database](#manually-add-and-remove-compile-flags-from-the-compilation-database)
12-
* [Using `CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES`](#using-cmake_cxx_implicit_include_directories)
12+
* [Using 'CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES'](#using-cmake_cxx_implicit_include_directories)
1313

1414
<!-- tocstop -->
1515

@@ -18,14 +18,17 @@ By default, `clang-uml` will look for file `.clang-uml` in the projects director
1818
from it. The file must be specified in YAML and it's overall structure is as follows:
1919

2020
```yaml
21-
<common options for all diagrams>
21+
# common options for all diagrams
22+
...
2223
diagrams:
23-
<first diagram name>:
24-
type: [class|sequence|package|include]
25-
<diagram specific options>
26-
<second diagram name>:
27-
type: [class|sequence|package|include]
28-
<diagram specific options>
24+
first_diagram_name>:
25+
type: class|sequence|package|include
26+
# diagram specific options
27+
...
28+
second_diagram_name:
29+
type: class|sequence|package|include
30+
# diagram specific options
31+
...
2932
...
3033
```
3134

@@ -116,7 +119,7 @@ These errors can be overcome, by ensuring that the Clang parser has the correct
116119
include paths to analyse your code base on the given platform. `clang-uml`
117120
provides several mechanisms to resolve this issue:
118121
119-
### Use `--query-driver` command line option
122+
### Use '--query-driver' command line option
120123
121124
> This option is not available on Windows.
122125
@@ -133,7 +136,7 @@ system, when generating diagrams for an embedded project and providing
133136
`arm-none-eabi-gcc` as driver:
134137

135138
```bash
136-
$ clang-uml --query-driver arm-none-eabi-gcc
139+
clang-uml --query-driver arm-none-eabi-gcc
137140
```
138141

139142
the following options are appended to each command line after `argv[0]` of the
@@ -148,7 +151,7 @@ already as `argv[0]` in your `compile_commands.json`, you can simply invoke
148151
`clang-uml` as:
149152

150153
```bash
151-
$ clang-uml --query-driver .
154+
clang-uml --query-driver .
152155
```
153156

154157
however please make sure that the `compile_commands.json` contain a command,
@@ -173,11 +176,11 @@ remove_compile_flags:
173176
These options can be also passed on the command line, for instance:
174177
175178
```bash
176-
$ clang-uml --add-compile-flag -I/opt/my_toolchain/include \
177-
--remove-compile-flag -I/usr/include ...
179+
clang-uml --add-compile-flag -I/opt/my_toolchain/include \
180+
--remove-compile-flag -I/usr/include ...
178181
```
179182

180-
### Using `CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES`
183+
### Using 'CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES'
181184
Yet another option, for CMake based projects, is to use the following CMake option:
182185

183186
```cmake

docs/diagram_templates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ clang-uml --show-template parents_hierarchy_tmpl
8888
users configuration file defines another template with a name which already
8989
exists as built-in template it will override the predefined templates.
9090

91-
Currently the following templates are built-in:
91+
Currently, the following templates are built-in:
9292
* `parents_hierarchy_tmpl` - generate inheritance hierarchy diagram including
9393
parents of a specified class
9494
* `subclass_hierarchy_tmpl` - generate inheritance hierarchy diagram including

docs/doxygen/github.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/doxygen/header.html

+36-23
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- BEGIN opengraph metadata -->
1010
<meta property="og:title" content="clang-uml" />
1111
<meta property="og:image" content="$relpath^clang-uml-logo.svg" />
12-
<meta property="og:description" content="C++ UML diagram generator based on Clang." />
12+
<meta property="og:description" content="C++ to UML diagram generator based on Clang." />
1313
<meta property="og:url" content="https://clang-uml.github.io/" />
1414
<!-- END opengraph metadata -->
1515

@@ -22,31 +22,35 @@
2222
<!--<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>-->
2323
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
2424
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
25-
<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>
26-
<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>
27-
<script type="text/javascript" src="$relpath^toggle-alternative-theme.js"></script>
25+
<!--<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>-->
26+
<!--<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>-->
27+
<!--<script type="text/javascript" src="$relpath^toggle-alternative-theme.js"></script>-->
2828
<script type="text/javascript">
2929
DoxygenAwesomeFragmentCopyButton.init()
3030
// DoxygenAwesomeDarkModeToggle.init()
3131
DoxygenAwesomeParagraphLink.init()
32-
DoxygenAwesomeInteractiveToc.init()
33-
DoxygenAwesomeTabs.init()
32+
// DoxygenAwesomeInteractiveToc.init()
33+
// DoxygenAwesomeTabs.init()
3434
</script>
3535
$treeview
3636
$search
3737
$mathjax
3838
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
3939

40-
<link rel="stylesheet" href="$relpath^solarized-light.min.css">
40+
<link rel="stylesheet" href="$relpath^github.min.css">
4141
<script src="$relpath^highlight.min.js"></script>
4242
<script>
4343
$(function() {
44+
hljs.configure({useBR: false});
4445
$(".fragment").each(function(i,node) {
4546
var $node = $(node);
46-
$node.html("<pre><code class='" +
47-
$node.attr("class")+"'>" +
48-
$node.text()+"</code></pre>");
49-
hljs.highlightElement(node);
47+
// Only apply highlight.js to non-cpp code blocks
48+
if (!$node.hasClass("language-cpp")) {
49+
$node.html("<pre><code class='" +
50+
$node.attr("class") + "'>" +
51+
$node.text() + "</code></pre>");
52+
hljs.highlightElement(node);
53+
}
5054
});
5155
});
5256
</script>
@@ -59,35 +63,44 @@
5963
<!-- <svg viewBox="0 0 250 250" width="70" height="70" style="position: absolute; top: 0; border: 0; right: 0; z-index: 99;" aria-hidden="true">-->
6064
<!-- <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>-->
6165

62-
63-
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
64-
66+
<div id="top" style="background-color: gainsboro"><!-- do not remove this div, it is closed by doxygen! -->
6567
<!--BEGIN TITLEAREA-->
6668
<div id="titlearea">
6769
<table cellspacing="0" cellpadding="0">
6870
<tbody>
6971
<tr style="height: 56px;">
7072
<!--BEGIN PROJECT_LOGO-->
71-
<td id="projectlogo"><a href="$relpath^index.html"><img alt="Main page" src="$relpath^$projectlogo"/></a></td>
73+
<td id="projectlogo">
74+
<a href="$relpath^index.html">
75+
<img alt="Main page" src="$relpath^$projectlogo"/>
76+
</a>
77+
</td>
7278
<!--END PROJECT_LOGO-->
7379
<!--BEGIN PROJECT_NAME-->
7480
<td id="projectalign" style="padding-left: 0.5em;">
75-
<div id="projectname">$projectname
76-
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
77-
</div>
78-
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
81+
<div id="projectname">
82+
<span id="projectnumber">$projectnumber</span>
83+
</div>
84+
<div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
7985
</td>
8086
<!--END PROJECT_NAME-->
8187
<!--BEGIN !PROJECT_NAME-->
8288
<!--BEGIN PROJECT_BRIEF-->
83-
<td style="padding-left: 0.5em;">
84-
<div id="projectbrief">$projectbrief</div>
85-
</td>
89+
<!-- <td style="padding-left: 0.5em;">-->
90+
<!-- <div id="projectbrief">$projectbrief</div>-->
91+
<!-- </td>-->
92+
<td>
93+
<div>
94+
<a href="https://github.com/bkryza/clang-uml">
95+
<img alt="GitHub" src="$relpath^github-mark.svg"/>
96+
</a>
97+
</div>
98+
</td>
8699
<!--END PROJECT_BRIEF-->
87100
<!--END !PROJECT_NAME-->
88101
<!--BEGIN DISABLE_INDEX-->
89102
<!--BEGIN SEARCHENGINE-->
90-
<td>$searchbox</td>
103+
<td>$searchbox</td>
91104
<!--END SEARCHENGINE-->
92105
<!--END DISABLE_INDEX-->
93106
</tr>

0 commit comments

Comments
 (0)