Skip to content

Commit fb370ad

Browse files
committed
Improved documentation
1 parent a6b48a9 commit fb370ad

11 files changed

+198
-72
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ diagrams:
114114
type: class
115115
glob:
116116
- src/*.cc
117-
using_namespace:
118-
- myproject
117+
using_namespace: myproject
119118
include:
120119
namespaces:
121120
- myproject

docs/class_diagrams.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ diagrams:
2929
glob:
3030
- src/*.cc
3131
# Render all names in the diagram relative to specific namespace
32-
using_namespace:
33-
- ns1
32+
using_namespace: ns1
3433
# Include only classes from specific namespace
3534
include:
3635
namespaces:
@@ -109,7 +108,7 @@ public:
109108
};
110109
```
111110

112-
generates the following diagram:
111+
results in the following diagram:
113112

114113
![extension](test_cases/t00007_class.svg)
115114

docs/comment_decorators.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class R {
8787
};
8888
```
8989
90-
generates the following class diagram:
90+
results in the following class diagram:
9191
9292
![note](./test_cases/t00028_class.svg)
9393
@@ -141,7 +141,7 @@ struct R {
141141
};
142142
```
143143

144-
generates the following diagram:
144+
results in the following diagram:
145145

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

@@ -185,7 +185,7 @@ struct R {
185185
};
186186
```
187187

188-
generates the following diagram:
188+
results in the following diagram:
189189

190190
![skip](./test_cases/t00030_class.svg)
191191

@@ -226,6 +226,6 @@ struct R {
226226
};
227227
```
228228

229-
generates the following diagram:
229+
results in the following diagram:
230230

231231
![skip](./test_cases/t00031_class.svg)

docs/common_options.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The syntax is simple and based on glob patterns, which can be added to the confi
5757
5858
The glob patterns only need to match the translation units, which are also in the `compile_commands.json` file, i.e.
5959
any files that match the glob patterns but are not in `compile_commands.json` will be ignored. In case the `glob`
60-
pattern set does not much any translation units an error will be printed on the standard output.
60+
pattern set does not match any translation units an error will be printed on the standard output.
6161

6262
For small projects, the `glob` property can be omitted, which will result in `clang-uml` parsing all translation units
6363
from `compile_commands.json` for the diagram. However for large projects, constraining the number of translation units
@@ -96,13 +96,14 @@ specific diagram element.
9696

9797
## Resolving include path and compiler flags issues
9898
Due to the fact, that your project can be compiled with different compilers
99-
and toolchains than the Clang version, which `clang-uml` uses on your platform,
100-
include paths specified in the generated `compile_commands.json` can be incorrect.
99+
and toolchains, the system paths and compilation flags detected by the Clang
100+
version linked to your `clang-uml` installation might differ from the ones
101+
actually used to compile your project.
101102

102103
> This is often an issue on macOS, when `clang-uml` uses Homebrew version of LLVM
103104
> and your project was built using system Apple Clang
104105

105-
Typically, this results in ugly error messages on the screen during diagram
106+
Typically, this results in error messages on the console during diagram
106107
generation, such as:
107108

108109
```
@@ -154,15 +155,15 @@ already as `argv[0]` in your `compile_commands.json`, you can simply invoke
154155
clang-uml --query-driver .
155156
```
156157

157-
however please make sure that the `compile_commands.json` contain a command,
158+
however please make sure that the `compile_commands.json` contains a command,
158159
which is safe to execute.
159160

160161
### Manually add and remove compile flags from the compilation database
161162
If the system paths extracted from the compiler are not sufficient to resolve
162163
include paths issues, it is possible to manually adjust the compilation
163-
flags providing `add_compile_flags` and `remove_compile_flags` in the
164+
flags by providing `add_compile_flags` and `remove_compile_flags` in the
164165
configuration file, or providing `--add-compile-flag` and `--remove-compile-flag`
165-
in the `clang-uml` command line.
166+
on the `clang-uml` command line.
166167

167168
For instance:
168169

docs/diagram_filters.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@ are included based on access scope (e.g. `public`).
194194

195195
## callee_types
196196

197-
This filter is specific for `sequence diagrams` and allows to control which types calls should be included/excluded from the diagram.
198-
In a sequence diagram, a `callee` is the receiver of a message, and this filter specifies which types of receivers should match.
197+
This filter is specific for `sequence diagrams` and allows to control, which
198+
types of callees should be included/excluded from the diagram. In a sequence diagram,
199+
a `callee` is the receiver of a message, and this filter specifies which types
200+
of receivers should match.
199201

200202
The following callee types are supported:
201203
* constructor
@@ -210,8 +212,9 @@ The following callee types are supported:
210212

211213
## dependants and dependencies
212214

213-
These filters allow to specify that only dependants or dependencies of a given class should be included in the diagram.
214-
This can be useful for analyzing what classes in your project depend on some other class, which could have impact for
215+
These filters allow to specify that only dependants or dependencies of a given
216+
class should be included in the diagram. This can be useful for analyzing what
217+
classes in your project depend on some other class, which could have impact for
215218
instance on refactoring.
216219

217220
For instance the following code:
@@ -283,6 +286,6 @@ and the following filter:
283286
- dependency
284287
```
285288

286-
generates the following diagram:
289+
results in the following diagram:
287290

288291
![t00043_class](./test_cases/t00043_class.svg)

docs/diagram_templates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ diagram_templates:
5454
5555
## Adding templates to the configuration file
5656
Diagram templates can be added directly to the `.clang-uml` configuration file,
57-
under a `diagram_templates:` key. However, for practical reasons its better
57+
under a `diagram_templates:` key. However, for practical reasons it is better
5858
to keep diagram template definitions in a separate Yaml file, and reference
5959
it in the configuration file using `include!` directive, e.g.:
6060

0 commit comments

Comments
 (0)