dotter

graphiz helpers
git clone git://deadbeef.fr/dotter.git
Log | Files | Refs | README | LICENSE

commit dff9c6cf8ae0ae4107d1c4461d5f4c0c364fc4a7
parent daf4626422d7644d57666be9b060650e300cd939
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Fri, 27 Nov 2020 12:54:39 +0100

uml: adds directive to change edge style

Diffstat:
MREADME | 7+++++++
Muml | 20+++++++++++++++-----
2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/README b/README @@ -158,3 +158,10 @@ Arg 1: package name ==== endpackage ==== Closes the current class. Closes the current package. + +==== splines ==== +Closes the current class. +Changes the edge style according to arg 1. + +Arg 1: new edge style. Some possible values: true, false, + polyline, ortho, line. See dot(1) for all accepted values. diff --git a/uml b/uml @@ -32,10 +32,15 @@ function relation( from, to, tail, head, label ) { } } +function close_relation() { + printf( " ];\n" ); +} + function depends( type ) { end_class(); relation( $2, $3, "none", "vee", type ); - printf( " style = \"dotted\" ];\n" ); + printf( " style = \"dotted\"" ); + close_relation(); } BEGIN { @@ -50,6 +55,11 @@ $0 == "protected" { scope = "[#]"; } $0 == "public" { scope = "[+]"; } $0 == "package" { scope = "[~]"; } +$1 == "splines" { + end_class(); + printf( "splines = %s;\n", $2 ); +} + $1 == "class" { end_class(); class = $2; @@ -85,25 +95,25 @@ $1 == "var" { $1 == "inherit" { end_class(); relation( $2, $3, "none", "empty", "" ); - printf( " ];\n" ); + close_relation(); } $1 == "associate" { end_class(); relation( $2, $3, "none", "vee", $4 ); - printf( " ];\n" ); + close_relation(); } $1 == "aggreg" { end_class(); relation( $2, $3, "odiamond", "vee", $4 ); - printf( " ];\n" ); + close_relation(); } $1 == "compose" { end_class(); relation( $2, $3, "diamond", "vee", $4 ); - printf( " ];\n" ); + close_relation(); } $1 == "depends" {