0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 09:03:42 +00:00

Added diagrams for documentation

This commit is contained in:
Benedikt Galbavy 2024-01-24 15:04:38 +01:00
parent 78f1b11d01
commit f36632c9fd
7 changed files with 80 additions and 0 deletions

2
.gitignore vendored
View File

@ -73,3 +73,5 @@ Thumbs.db
Desktop.ini Desktop.ini
compile_commands.json compile_commands.json
*.puml

62
docs/diagrams/.clang-uml Normal file
View File

@ -0,0 +1,62 @@
compilation_database_dir: ../..
output_directory: .
diagrams:
includes:
type: include
relative_to: ../..
glob:
- src/*.cpp
- include/*.h
generate_system_headers: true
include:
paths:
- src
- include
plantuml:
before:
- 'skinparam linetype ortho'
includes_no_external:
type: include
relative_to: ../..
glob:
- src/*.cpp
- include/*.h
include:
paths:
- src
- include
plantuml:
before:
- 'skinparam linetype ortho'
classes:
type: class
relative_to: ../..
glob:
- src/*.cpp
- include/*.h
include:
paths:
- src
- include
plantuml:
before:
- 'skinparam linetype ortho'
load_map_example_sequence:
type: sequence
relative_to: ../..
glob:
- src/*.cpp
- include/*.h
include:
paths:
- src
- include
start_from:
- function: "Map::loadMap(const char *,int,int)"
plantuml:
before:
- 'skinparam linetype ortho'

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 101 KiB

12
docs/diagrams/howto.md Normal file
View File

@ -0,0 +1,12 @@
Need [clang-uml](https://clang-uml.github.io/index.html)
```sh
clang-uml
clang-uml --add-compile-flag -I/usr/lib/clang/16/include # might need additional flags, example for my machine
clang-uml --print-from -n load_map_example_sequence # to get availabel commands for sequence diagram
```
then use plant uml to generate an actual `.svg` vector graphic
```sh
plantuml -tsvg *.puml
```

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 81 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 52 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB