Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PlantUML script for generating a UML class diagram #18

Merged
merged 4 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
# Prerequisites
*.d
# Generated documentation
doc/html
*.png

# Build directory
build

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
# Executable program
a.out
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ into submodules.
As compared to the original code, this repository also adds
1. A [Fortran Package Manager] build system,
2. Tests based on the [Vegetables] unit-testing software,
3. Documentation generated by [FORD] and deployed to the web via GitHub Actions, and
3. Documentation generated by [`ford`] and deployed to the web via GitHub Actions, and
4. Quality control via continuous integration testing using GitHub Actions.

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

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.

![class_diagram](https://user-images.githubusercontent.com/13108868/165135689-4d2e85fe-6946-472f-a154-aaabebf6d4f5.png)

The above image was created with the PlantuML package in the [Atom] editor.


Compiler Status
---------------
Correct execution of the Reference Counter library code requires comprehensive
Expand Down Expand Up @@ -110,5 +117,8 @@ fpm test --compiler flang --flag -cpp
[3]: https://doi.org/10.1109/MCSE.2012.33
[Fortran Package Manager]: https://github.com/fortran-lang/fpm
[Vegetables]: https://gitlab.com/everythingfunctional/vegetables
[FORD]: https://github.com/Fortran-FOSS-Programmers/ford
[`ford`]: https://github.com/Fortran-FOSS-Programmers/ford
[Reference Counter's GitHub Pages site]: https://sourceryinstitute.github.io/reference-counter
[Atom]: https://atom.io
[PlantUML]: https://plantuml.com
[doc/]: ./doc
28 changes: 28 additions & 0 deletions doc/class_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@startuml

title Reference Counter Class Diagram

hide empty members

abstract class resource_t {
{abstract} free()
}

class counter_t {
- count_ : integer, pointer
- object_ : resource_t
grab()
release()
}

abstract class reference_t {
- counter_ : counter_t
release_handle()
start_ref_counter()
}

reference_t -up-|> resource_t
reference_t *- counter_t
counter_t *- resource_t

@enduml