Skip to content

Commit 424c510

Browse files
authored
Merge pull request #18 from sourceryinstitute/class-diagram
Add PlantUML script for generating a UML class diagram
2 parents 37f3cab + 588c2d6 commit 424c510

File tree

3 files changed

+48
-26
lines changed

3 files changed

+48
-26
lines changed

.gitignore

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
1-
# Prerequisites
2-
*.d
1+
# Generated documentation
2+
doc/html
3+
*.png
4+
5+
# Build directory
6+
build
37

48
# Compiled Object files
5-
*.slo
6-
*.lo
79
*.o
8-
*.obj
9-
10-
# Precompiled Headers
11-
*.gch
12-
*.pch
13-
14-
# Compiled Dynamic libraries
15-
*.so
16-
*.dylib
17-
*.dll
1810

1911
# Fortran module files
2012
*.mod
2113
*.smod
2214

23-
# Compiled Static libraries
24-
*.lai
25-
*.la
26-
*.a
27-
*.lib
28-
29-
# Executables
30-
*.exe
31-
*.out
32-
*.app
15+
# Executable program
16+
a.out

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,20 @@ into submodules.
4242
As compared to the original code, this repository also adds
4343
1. A [Fortran Package Manager] build system,
4444
2. Tests based on the [Vegetables] unit-testing software,
45-
3. Documentation generated by [FORD] and deployed to the web via GitHub Actions, and
45+
3. Documentation generated by [`ford`] and deployed to the web via GitHub Actions, and
4646
4. Quality control via continuous integration testing using GitHub Actions.
4747

4848
Documentation
4949
-------------
5050
See [Reference Counter's GitHub Pages site] for HTML documentation generated with [`ford`].
5151

52+
See the [doc/] subdirectory for a [PlantUML] script that generates the Unified Modeling Langauge (UML) class diagram below of the three derived types in reference-counter.
53+
54+
![class_diagram](https://user-images.githubusercontent.com/13108868/165135689-4d2e85fe-6946-472f-a154-aaabebf6d4f5.png)
55+
56+
The above image was created with the PlantuML package in the [Atom] editor.
57+
58+
5259
Compiler Status
5360
---------------
5461
Correct execution of the Reference Counter library code requires comprehensive
@@ -110,5 +117,8 @@ fpm test --compiler flang --flag -cpp
110117
[3]: https://doi.org/10.1109/MCSE.2012.33
111118
[Fortran Package Manager]: https://github.com/fortran-lang/fpm
112119
[Vegetables]: https://gitlab.com/everythingfunctional/vegetables
113-
[FORD]: https://github.com/Fortran-FOSS-Programmers/ford
120+
[`ford`]: https://github.com/Fortran-FOSS-Programmers/ford
114121
[Reference Counter's GitHub Pages site]: https://sourceryinstitute.github.io/reference-counter
122+
[Atom]: https://atom.io
123+
[PlantUML]: https://plantuml.com
124+
[doc/]: ./doc

doc/class_diagram.puml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@startuml
2+
3+
title Reference Counter Class Diagram
4+
5+
hide empty members
6+
7+
abstract class resource_t {
8+
{abstract} free()
9+
}
10+
11+
class counter_t {
12+
- count_ : integer, pointer
13+
- object_ : resource_t
14+
grab()
15+
release()
16+
}
17+
18+
abstract class reference_t {
19+
- counter_ : counter_t
20+
release_handle()
21+
start_ref_counter()
22+
}
23+
24+
reference_t -up-|> resource_t
25+
reference_t *- counter_t
26+
counter_t *- resource_t
27+
28+
@enduml

0 commit comments

Comments
 (0)