15
15
<!-- tocstop -->
16
16
17
17
## Overall configuration file structure
18
- By default, ` clang-uml ` will look for file ` .clang-uml ` in the project's directory and read all diagrams definitions
19
- configuration from it. The file must be specified in YAML and it's overall structure is as follows:
18
+ By default, ` clang-uml ` will look for file ` .clang-uml ` in the project's
19
+ directory and read all diagram definitions configuration from it. The file must
20
+ be specified in YAML and it's overall structure is as follows:
20
21
21
22
``` yaml
22
- # common options for all diagrams
23
- ...
23
+ # Common options for all diagrams
24
+ # ...
25
+ # Diagram definitions
24
26
diagrams :
25
27
first_diagram_name :
26
28
type : class|sequence|package|include
27
- # diagram specific options
28
- ...
29
+ # Diagram specific options
30
+ # ...
29
31
second_diagram_name :
30
32
type : class|sequence|package|include
31
- # diagram specific options
32
- ...
33
- ...
33
+ # Diagram specific options
34
+ # ...
35
+ # More diagrams
36
+ # ...
34
37
```
35
38
36
- The top level common options are inherited by specific diagrams, if the option is applicable to them and they themselves
37
- do not override this option.
39
+ The top level common options are inherited by specific diagrams, if the option
40
+ is applicable to them and they themselves do not override this option.
38
41
39
42
For detailed reference of all configuration options see [ here] ( ./configuration_file.md ) .
40
43
41
- Effective configuration, including default values can be printed out in YAML format using the following option:
44
+ Effective configuration, including default values can be printed out in YAML
45
+ format using the following option:
42
46
43
47
``` bash
44
48
clang-uml --dump-config
@@ -56,24 +60,29 @@ diagrams:
56
60
` ` `
57
61
58
62
## Translation unit glob patterns
59
- One of the key options of the diagram configuration is the list of translation units, which should be parsed to
60
- get all necessary information for a diagram.
63
+ One of the key options of the diagram configuration is the list of translation
64
+ units, which should be parsed to get all necessary information for a diagram.
61
65
62
- The syntax is simple and based on glob patterns, which can be added to the configuration file as follows:
66
+ The syntax is simple and based on glob patterns, which can be added to the
67
+ configuration file as follows:
63
68
64
69
` ` ` yaml
65
70
glob :
66
71
- src/dir1/*.cc
67
72
- src/dir3/*.cc
68
73
` ` `
69
74
70
- The glob patterns only need to match the translation units, which are also in the ` compile_commands.json` file, i.e.
71
- any files that match the glob patterns, but are not in `compile_commands.json` will be ignored. In case the `glob`
72
- pattern set does not match any translation units an error will be printed on the standard output.
75
+ The glob patterns only need to match the translation units, which are also in
76
+ the ` compile_commands.json` file, i.e. any files that match the glob patterns,
77
+ but are not in `compile_commands.json` will be ignored. In case the `glob`
78
+ pattern set does not match any translation units an error will be printed on
79
+ the standard output.
73
80
74
- For small projects, the `glob` property can be omitted, which will result in `clang-uml` parsing all translation units
75
- from `compile_commands.json` for the diagram. However, for large projects, constraining the number of translation units
76
- for each diagram to absolute minimum will significantly decrease the diagram generation times.
81
+ For small projects, the `glob` property can be omitted, which will result in
82
+ ` clang-uml` parsing all translation units from `compile_commands.json` for
83
+ the diagram. However, for large projects, constraining the number of translation
84
+ units for each diagram to minimum necessary to discover all necessary diagram
85
+ elements will significantly decrease the diagram generation times.
77
86
78
87
# # Custom directives
79
88
In case it's necessary to add some custom PlantUML or MermaidJS declarations
@@ -122,13 +131,13 @@ the generated PlantUML diagram will contain comments before each line containing
122
131
the source location of the specific diagram element.
123
132
124
133
# # Resolving include path and compiler flags issues
125
- Due to the fact, that your project can be compiled with different compilers
134
+ Due to the fact, that a project can be compiled with different compilers
126
135
and toolchains, the system paths and compilation flags detected by the Clang
127
136
version linked to your `clang-uml` installation might differ from the ones
128
137
actually used to compile your project.
129
138
130
139
> This is often an issue on macOS, when `clang-uml` uses Homebrew version of LLVM
131
- > and your project was built using system Apple Clang
140
+ > and a project was built using system Apple Clang.
132
141
133
142
Typically, this results in error messages on the console during diagram
134
143
generation, such as :
0 commit comments