Révision | 446a1747e733432883372d452e2a6723b6fd70f1 (tree) |
---|---|
l'heure | 2023-11-21 05:28:20 |
Auteur | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
Is it a hack? Should it be in RenderNS (ToDo), or ... -- Found a solution to render Slowstart_1 correctly
@@ -6,8 +6,8 @@ | ||
6 | 6 | |
7 | 7 | ''NOTE: Old RTD/plantuml.1.2020.2.jar syntax! |
8 | 8 | |
9 | -'!procedure $comp($name) | |
10 | -!function $comp($name) | |
9 | +!procedure $comp($name) | |
10 | +''!function $comp($name) | |
11 | 11 | !$in = $name + "in" |
12 | 12 | !$out = $name + "out" |
13 | 13 |
@@ -17,8 +17,8 @@ | ||
17 | 17 | |
18 | 18 | $in )-- $name |
19 | 19 | $name --( $out |
20 | -'!endprocedure | |
21 | -!endfunction | |
20 | +!endprocedure | |
21 | +''!endfunction | |
22 | 22 | |
23 | 23 | |
24 | 24 | frame "CCastle Compiler" as CCC #c0c0c0 { |
@@ -1,32 +1,30 @@ | ||
1 | 1 | AIGR/SIEVE Namespace analyse |
2 | 2 | ============================ |
3 | 3 | |
4 | -.. UML:: | |
4 | +.. uml:: | |
5 | 5 | |
6 | 6 | @startuml |
7 | 7 | skin rose |
8 | - skinparam style strictuml | |
9 | - | |
8 | + 'skinparam style strictuml | |
10 | 9 | skinparam sequenceMessageAlign left |
11 | 10 | |
12 | - | |
13 | 11 | actor Dev |
14 | - | |
12 | + entity T_Protocol | |
13 | + boundary "CastleMacros.jinja2" as m | |
15 | 14 | |
16 | 15 | !procedure $register($ns, $n, $details=0) |
17 | 16 | Dev -> $ns : register($n) |
18 | - $ns o--\o $n : ""$ns._dict[$n]=$n"" | |
17 | + $ns o--\o $n : ""$ns._dict[$n] := $n"" | |
19 | 18 | activate $ns |
20 | 19 | |
21 | 20 | !if $details |
22 | 21 | group details |
23 | 22 | $ns -> $ns : _register_2ways() |
24 | 23 | $ns-> $n : register_in_NS() |
25 | - $n o--\o $ns :""$n._ns=$ns"" | |
26 | 24 | end |
25 | + $n o--\o $ns :""$n._ns := $ns"" | |
27 | 26 | !else |
28 | - $ns-> $n : register_in_NS() | |
29 | - $n o--\o $ns :""$n._ns=$ns"" | |
27 | + $n o--\o $ns :""$n._ns := $ns"" | |
30 | 28 | !endif |
31 | 29 | deactivate $ns |
32 | 30 | !endprocedure |
@@ -34,13 +32,73 @@ | ||
34 | 32 | |
35 | 33 | participant "simple_sieve :NS" as simple_sieve #LightSkyBlue |
36 | 34 | participant "slow_start :NS" as slow_start #LightSkyBlue |
35 | + participant "SimpleSieve:P" as SimpleSieve | |
37 | 36 | participant "SlowStart_1:P" as SlowStart_1 |
38 | - participant "SimpleSieve:P" as SimpleSieve | |
39 | 37 | participant "SlowStart:P" as SlowStart |
40 | 38 | |
39 | + == TestDoubles/AIGR/sieve/namespaces.py == | |
40 | + | |
41 | + $register(simple_sieve, slow_start,1) | |
42 | + alt "old AIGR" | |
43 | + $register(simple_sieve, SlowStart_1) | |
44 | + else "deleted 'simple_sieve.register(protocols.SlowStart_1)'" | |
45 | + note over simple_sieve, SlowStart1 #aqua: Is it a hack? Should it be in RenderNS (ToDo), or ... | |
46 | + end | |
47 | + $register(simple_sieve, SimpleSieve) | |
48 | + $register(slow_start, SlowStart) | |
49 | + | |
50 | + == pytst/writers/RPy/test_3_SieveProtocols.py== | |
51 | + | |
41 | 52 | |
53 | + [-> T_Protocol: render((sieve.SlowStart_1, sieve.SimpleSieve)) | |
54 | + note left: ""inherit_from={{proto.based_on.ns.name}}.{{m.ProtocolName(proto.based_on)}}"" | |
42 | 55 | |
43 | - $register(simple_sieve, slow_start,1) | |
44 | - $register(simple_sieve, SlowStart_1) | |
45 | - $register(simple_sieve, SimpleSieve) | |
56 | + ... sieve.SlowStart_1 ... | |
57 | + T_Protocol -> SlowStart_1: based_on() | |
58 | + SlowStart_1 o/--x SlowStart: "".based_on"" | |
59 | + T_Protocol <-- SlowStart_1: SlowStart | |
60 | + | |
61 | + T_Protocol -> SlowStart: ns() | |
62 | + T_Protocol <-- SlowStart: slow_start | |
63 | + | |
64 | + opt "obj 2 str" | |
65 | + T_Protocol -> slow_start :name | |
66 | + T_Protocol <-- slow_start : "slow_start" | |
67 | + end | |
68 | + | |
69 | + T_Protocol -> m: ProtocolName(SlowStart) | |
70 | + T_Protocol <--m: ""cc_P_Slowstart"" | |
71 | + note right: cc_P_{{Proto.name}} | |
72 | + note left of T_Protocol: inherit_from=slow_start.cc_P_SlowStart | |
73 | + | |
74 | + ... sieve.SimpleSieve ... | |
75 | + T_Protocol -> SimpleSieve: based_on() | |
76 | + SimpleSieve o/--x SlowStart_1: "".based_on"" | |
77 | + T_Protocol <-- SimpleSieve: SlowStart_1 | |
78 | + | |
79 | + T_Protocol -> SlowStart_1: ns() | |
80 | + alt "old AIGR" | |
81 | + T_Protocol <-- SlowStart_1: simple_sieve | |
82 | + note left: Note: ‘simple_sieve’ is (also) is the current namespace\n\tSo, it should be named | |
83 | + | |
84 | + opt "obj 2 str" | |
85 | + T_Protocol -> simple_sieve : name | |
86 | + T_Protocol <-- simple_sieve : "<color:red>simple_sieve</color>" | |
87 | + end | |
88 | + | |
89 | + T_Protocol -> m: ProtocolName(SimpleSieve) | |
90 | + T_Protocol <--m: ""cc_P_SimpleSieve"" | |
91 | + note right: cc_P_{{Proto.name}} | |
92 | + | |
93 | + note left of T_Protocol #orangered: <color:yellow>inherit_from=<color:white>simple_sieve.<color:yellow>cc_P_SimpleSieve | |
94 | + else "deteled 'simple_sieve.register(protocols.SlowStart_1)'" | |
95 | + T_Protocol <-- SlowStart_1: <NIL> | |
96 | + | |
97 | + T_Protocol -> m: ProtocolName(SimpleSieve) | |
98 | + T_Protocol <--m: ""cc_P_SimpleSieve"" | |
99 | + | |
100 | + note left of T_Protocol #lime: <color:white>inherit_from=cc_P_SimpleSieve</color> | |
101 | + end | |
102 | + | |
46 | 103 | @enduml |
104 | + |