diff --git a/.gitignore b/.gitignore index 259148f..a3471b3 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/README.md b/README.md index fe95a17..91a2493 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/doc/class_diagram.puml b/doc/class_diagram.puml new file mode 100644 index 0000000..be9c62b --- /dev/null +++ b/doc/class_diagram.puml @@ -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