forked from stawirej/C4-PlantUML
-
Notifications
You must be signed in to change notification settings - Fork 1
/
C4.puml
198 lines (149 loc) · 4.82 KB
/
C4.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
' C4-PlantUML, version 1.0.0
' https://github.com/RicardoNiepel/C4-PlantUML
' Colors
' ##################################
!procedure ELEMENT_FONT_COLOR()
#FFFFFF
!endprocedure
' Styling
' ##################################
!$TECHN_FONT_SIZE=12
skinparam defaultTextAlignment center
skinparam wrapWidth 200
skinparam maxMessageSize 150
skinparam rectangle {
StereotypeFontSize 12
shadowing false
}
skinparam database {
StereotypeFontSize 12
shadowing false
}
skinparam Arrow {
Color #666666
FontColor #666666
FontSize 12
}
skinparam rectangle<<boundary>> {
Shadowing false
StereotypeFontSize 0
FontColor #444444
BorderColor #444444
BorderStyle dashed
}
' Layout
' ##################################
!procedure LAYOUT_AS_SKETCH()
skinparam backgroundColor #EEEBDC
skinparam handwritten true
skinparam defaultFontName "Comic Sans MS"
center footer <font color=red>Warning:</font> Created for discussion, needs to be validated
!endprocedure
!procedure LAYOUT_TOP_DOWN()
top to bottom direction
!endprocedure
!procedure LAYOUT_LEFT_RIGHT()
left to right direction
!endprocedure
' Boundaries
' ##################################
!unquoted procedure Boundary(e_alias, e_label)
rectangle "==e_label" <<boundary>> as e_alias
!endprocedure
!unquoted procedure Boundary(e_alias, e_label, e_type)
rectangle "==e_label\n<size:$TECHN_FONT_SIZE>[e_type]</size>" <<boundary>> as e_alias
!endprocedure
' Relationship
' ##################################
!unquoted procedure Rel_(e_alias1, e_alias2, e_label, e_direction="")
e_alias1 e_direction e_alias2 : "===e_label"
!endprocedure
!unquoted procedure Rel_(e_alias1, e_alias2, e_label, e_techn, e_direction="")
e_alias1 e_direction e_alias2 : "===e_label\n//<size:$TECHN_FONT_SIZE>[e_techn]</size>//"
!endprocedure
!unquoted procedure Rel(e_from,e_to, e_label)
Rel_(e_from,e_to, e_label, "-->")
!endprocedure
!unquoted procedure Rel(e_from,e_to, e_label, e_techn)
Rel_(e_from,e_to, e_label, e_techn, "-->")
!endprocedure
!unquoted procedure Rel_Back(e_to, e_from, e_label)
Rel_(e_to, e_from, e_label, "<--")
!endprocedure
!unquoted procedure Rel_Back(e_to, e_from, e_label, e_techn)
Rel_(e_to, e_from, e_label, e_techn, "<--")
!endprocedure
!unquoted procedure Rel_Neighbor(e_from, e_to, e_label)
Rel_(e_from,e_to, e_label, "->")
!endprocedure
!unquoted procedure Rel_Neighbor(e_from, e_to, e_label, e_techn)
Rel_(e_from,e_to, e_label, e_techn, "->")
!endprocedure
!unquoted procedure Rel_Back_Neighbor(e_to, e_from, e_label)
Rel_(e_to, e_from, e_label, "<-")
!endprocedure
!unquoted procedure Rel_Back_Neighbor(e_to, e_from, e_label, e_techn)
Rel_(e_to, e_from, e_label, e_techn, "<-")
!endprocedure
!unquoted procedure Rel_D(e_from,e_to, e_label)
Rel_(e_from,e_to, e_label, "-DOWN->")
!endprocedure
!unquoted procedure Rel_D(e_from,e_to, e_label, e_techn)
Rel_(e_from,e_to, e_label, e_techn, "-DOWN->")
!endprocedure
!unquoted procedure Rel_Down(e_from,e_to, e_label)
Rel_D(e_from,e_to, e_label)
!endprocedure
!unquoted procedure Rel_Down(e_from,e_to, e_label, e_techn)
Rel_D(e_from,e_to, e_label, e_techn)
!endprocedure
!unquoted procedure Rel_U(e_from,e_to, e_label)
Rel_(e_from,e_to, e_label, "-UP->")
!endprocedure
!unquoted procedure Rel_U(e_from,e_to, e_label, e_techn)
Rel_(e_from,e_to, e_label, e_techn, "-UP->")
!endprocedure
!unquoted procedure Rel_Up(e_from,e_to, e_label)
Rel_U(e_from,e_to, e_label)
!endprocedure
!unquoted procedure Rel_Up(e_from,e_to, e_label, e_techn)
Rel_U(e_from,e_to, e_label, e_techn)
!endprocedure
!unquoted procedure Rel_L(e_from,e_to, e_label)
Rel_(e_from,e_to, e_label, "-LEFT->")
!endprocedure
!unquoted procedure Rel_L(e_from,e_to, e_label, e_techn)
Rel_(e_from,e_to, e_label, e_techn, "-LEFT->")
!endprocedure
!unquoted procedure Rel_Left(e_from,e_to, e_label)
Rel_L(e_from,e_to, e_label)
!endprocedure
!unquoted procedure Rel_Left(e_from,e_to, e_label, e_techn)
Rel_L(e_from,e_to, e_label, e_techn)
!endprocedure
!unquoted procedure Rel_R(e_from,e_to, e_label)
Rel_(e_from,e_to, e_label, "-RIGHT->")
!endprocedure
!unquoted procedure Rel_R(e_from,e_to, e_label, e_techn)
Rel_(e_from,e_to, e_label, e_techn, "-RIGHT->")
!endprocedure
!unquoted procedure Rel_Right(e_from,e_to, e_label)
Rel_R(e_from,e_to, e_label)
!endprocedure
!unquoted procedure Rel_Right(e_from,e_to, e_label, e_techn)
Rel_R(e_from,e_to, e_label, e_techn)
!endprocedure
' Layout Helpers
' ##################################
!unquoted procedure Lay_D(e_from, e_to)
e_from -[hidden]D- e_to
!endprocedure
!unquoted procedure Lay_U(e_from, e_to)
e_from -[hidden]U- e_to
!endprocedure
!unquoted procedure Lay_R(e_from, e_to)
e_from -[hidden]R- e_to
!endprocedure
!unquoted procedure Lay_L(e_from, e_to)
e_from -[hidden]L- e_to
!endprocedure