From b37b2daf367ca40075679b52bdebcf5b4ba0ae15 Mon Sep 17 00:00:00 2001 From: kirchsth Date: Sat, 2 Sep 2023 17:45:55 +0200 Subject: [PATCH] #320 Dynamic/Sequence fix Rel() without $index argument --- C4_Dynamic.puml | 41 +++++++++++++++++++++++++++++++++++++++-- C4_Sequence.puml | 4 ++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/C4_Dynamic.puml b/C4_Dynamic.puml index fa408ba8..f12cb862 100644 --- a/C4_Dynamic.puml +++ b/C4_Dynamic.puml @@ -35,10 +35,14 @@ $getRel($direction, $alias1, $alias2, $e_index + ": " + $label, $techn, "", "", ' all RelIndex... calls are outdated, Rel(..., $index=...) calls should be used !!!! +' first Rel() supports the $index argument too; second Rel() overwrites C4.puml definition !unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") !$pre = $getPrefix($index) $getRel("-->>", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("-->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure @@ -47,6 +51,9 @@ $getRel("-->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $ !$pre = $getPrefix($index) $getRel("<<--", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Back($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex_Back($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("<<--", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure @@ -55,6 +62,9 @@ $getRel("<<--", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $ !$pre = $getPrefix($index) $getRel("->>", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Neighbor($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure @@ -63,6 +73,9 @@ $getRel("->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $t !$pre = $getPrefix($index) $getRel("<<-", $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Back_Neighbor($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex_Back_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel("<<-", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure @@ -71,10 +84,16 @@ $getRel("<<-", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $t !$pre = $getPrefix($index) $getRel($down("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_D($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") !$pre = $getPrefix($index) $getRel($down("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Down($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex_D($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($down("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure @@ -86,10 +105,16 @@ $getRel($down("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, !$pre = $getPrefix($index) $getRel($up("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_U($from, $to, $label, $techn, $descr, $sprite, $tags, $link=, "") +!endprocedure !unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") !$pre = $getPrefix($index) $getRel($up("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Up($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex_U($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($up("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure @@ -101,9 +126,15 @@ $getRel($up("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $s !$pre = $getPrefix($index) $getRel($left("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_L($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure +!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") !$pre = $getPrefix($index) -$getRel($left("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link, $index="") +$getRel($left("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) +!endprocedure +!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Left($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") !endprocedure !unquoted procedure RelIndex_L($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($left("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) @@ -116,10 +147,16 @@ $getRel($left("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, !$pre = $getPrefix($index) $getRel($right("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_R($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="") !$pre = $getPrefix($index) $getRel($right("-","->>"), $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel_Right($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "") +!endprocedure !unquoted procedure RelIndex_R($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") $getRel($right("-","->>"), $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure diff --git a/C4_Sequence.puml b/C4_Sequence.puml index 5938c813..2da951c1 100644 --- a/C4_Sequence.puml +++ b/C4_Sequence.puml @@ -380,6 +380,7 @@ end box ' only Rel is supported in sequence diagram +' first Rel() supports the $index and $rel argument too; second Rel() overwrites C4.puml definition ' don't add empty lines in procedure otherwise & calls are not working anymore '& a -> b: call' are not working anymore !unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $index="", $rel="") !if ($show_index == %true()) @@ -392,3 +393,6 @@ end box !endif $getRel($rel, $from, $to, $pre + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure +!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +Rel($from, $to, $label, $techn, $descr, $sprite, $tags, $link, "", "") +!endprocedure