commit 1be2cdd2c2bc56f4dcc41833ccd3234d0c452511
parent 2ed76fac28708faf5c0eb84b84a6f1507fe958dc
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date: Fri, 27 Nov 2020 02:06:25 +0100
improved class diagram doc
Diffstat:
M | README | | | 127 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- |
1 file changed, 125 insertions(+), 2 deletions(-)
diff --git a/README b/README
@@ -1,3 +1,5 @@
+= dotter =
+
This project aims at providing a set of scripts to generate
graphviz code for various uses.
@@ -7,11 +9,132 @@ List of uses:
* TODO: physical/logical network diagrams
* TODO: daemon dependencies diagrams
-Dependencies:
+== TODO ==
+
+Error checking.
+
+== Dependencies ==
* awk (tested with mawk 1.3.3 under Debian Buster)
* dot
-Usage exemple:
+== UML-like class diagram ==
+
+=== Usage exemple ===
* uml-like: ./uml FILE | dot -Tpdf /tmp/FILE.pdf && mupdf /tmp/FILE.pdf
+
+=== syntax ===
+
+Lines start with the directive's name.
+One directive per line.
+Arguments and directives are separated by spaces and tabs.
+Unknown directives are ignored.
+Excess arguments are ignored.
+
+List of directives:
+
+* private
+* public
+* protected
+* package
+* class
+* fun
+* virtual
+* abstract
+* var
+* inherit
+* associate
+* aggreg
+* compose
+* depends
+
+==== private ====
+
+New elements will have the "private" visibility.
+No immediate effect.
+No argument.
+
+==== public ====
+New elements will have the "public" visibility.
+No immediate effect.
+No argument.
+
+==== protected ====
+New elements will have the "protected" visibility.
+No immediate effect.
+No argument.
+
+==== package ====
+New elements will have the "package" visibility.
+No immediate effect.
+No argument.
+
+==== class ====
+Starts a new class.
+Arg 1: class name.
+
+==== fun ====
+Adds a method to the current class.
+If previous change was not a method (optionaly virtual or
+abstract), draw a separation line before starting.
+
+Arg 1: return type
+Arg 2: function name
+Arg 3 to N: (N - 2)th function parameter, type, attributes,
+ name, etc are separated by ":" instead of " ".
+
+==== virtual ====
+Adds a virtual method to the current class.
+Otherwise identical to "fun".
+
+==== abstract ====
+Adds an abstract method to the current class.
+Otherwise identical to "fun".
+
+==== var ====
+Adds a property to the current class.
+If previous change was not a property, draw a separation
+line before starting.
+
+Arg 1: property type
+Arg 2: property name
+Arg 3: optional initialisation value.
+
+==== inherit ====
+Defines an inheritance relation.
+Closes the current class.
+
+Arg 1: sub-class
+Arg 2: ancestor
+
+==== associate ====
+Defines an association relation.
+Closes the current class.
+
+Arg 1: "owner" class
+Arg 2: target class
+Arg 3: relation name
+
+==== aggreg ====
+Defines an aggregation relation.
+Closes the current class.
+
+Arg 1: "owner" class
+Arg 2: target class
+Arg 3: relation name
+
+==== compose ====
+Defines an composition relation.
+Closes the current class.
+
+Arg 1: "owner" class
+Arg 2: target class
+Arg 3: relation name
+
+==== depends ====
+Defines a dependency relation.
+Closes the current class.
+
+Arg 1: "owner" class
+Arg 2: target class