dotter

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

commit 3050e351ad9b99de010605d37e10657f9dc1e65f
parent 0059eae50ec95f7a2f4ea86b93d46f9e6c5ae8bc
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Fri, 27 Nov 2020 12:07:23 +0100

uml: adds friend relations

Diffstat:
MREADME | 8++++++++
Muml | 14+++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/README b/README @@ -48,6 +48,7 @@ List of directives: * aggreg * compose * depends +* friend ==== private ==== @@ -138,3 +139,10 @@ Closes the current class. Arg 1: "owner" class Arg 2: target class + +==== friend ==== +Defines a friendship relationt +Closes the current class. + +Arg 1: "owner" class +Arg 2: target class diff --git a/uml b/uml @@ -32,6 +32,12 @@ function relation( from, to, tail, head, label ) { } } +function depends( type ) { + end_class(); + relation( $2, $3, "none", "vee", type ); + printf( " style = \"dotted\" ];\n" ); +} + BEGIN { printf( "digraph %s\n{\n", FILENAME ); class = ""; @@ -101,9 +107,11 @@ $1 == "compose" { } $1 == "depends" { - end_class(); - relation( $2, $3, "none", "vee", "" ); - printf( " style = \"dotted\" ];\n" ); + depends( "" ); +} + +$1 == "friend" { + depends( "friend" ); } END {