Skip to content

Commit 1db64bf

Browse files
committed
support all PlantUML elements - new argument is called $baseShape
1 parent 2ef536e commit 1db64bf

File tree

8 files changed

+112
-112
lines changed

8 files changed

+112
-112
lines changed

C4.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
' ##################################
55
' ENABLE_ALL_PLANT_ELEMENTS
66
' If ENABLE_ALL_PLANT_ELEMENTS is set BEFORE the first C4_* file is loaded, nearly "all" PlantUML elements can be used like
7-
' Component(StorageA, "Storage A ", $plant="storage")
7+
' Component(StorageA, "Storage A ", $baseShape="storage")
88
' ENABLE_ALL_PLANT_ELEMENTS can be set via
99
' !ENABLE_ALL_PLANT_ELEMENTS = 1
1010
' or with additional command line argument -DENABLE_ALL_PLANT_ELEMENTS=1

C4_Component.puml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ endlegend
5858
' Elements
5959
' ##################################
6060

61-
!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
62-
$getElementLine($plant, "component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
61+
!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
62+
$getElementLine($baseShape, "component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
6363
!endprocedure
6464

6565
!unquoted procedure ComponentDb($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
@@ -70,8 +70,8 @@ endlegend
7070
$getElementLine("queue", "component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
7171
!endprocedure
7272

73-
!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
74-
$getElementLine($plant, "external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
73+
!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
74+
$getElementLine($baseShape, "external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
7575
!endprocedure
7676

7777
!unquoted procedure ComponentDb_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")

C4_Container.puml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ endlegend
6565
' Elements
6666
' ##################################
6767

68-
!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
69-
$getElementLine($plant , "container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
68+
!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
69+
$getElementLine($baseShape , "container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
7070
!endprocedure
7171

7272
!unquoted procedure ContainerDb($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
@@ -77,8 +77,8 @@ endlegend
7777
$getElementLine("queue", "container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
7878
!endprocedure
7979

80-
!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
81-
$getElementLine($plant , "external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
80+
!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
81+
$getElementLine($baseShape , "external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
8282
!endprocedure
8383

8484
!unquoted procedure ContainerDb_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")

C4_Context.puml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ rectangle "$getPerson($label, $type, $descr, $sprite)$getProps()" $toStereos("ex
380380
!endif
381381
!endprocedure
382382

383-
!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $plant="rectangle")
383+
!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $baseShape="rectangle")
384384
' $type reuses $techn definition of $tags
385-
$getElementLine($plant, "system", $alias, $label, $type, $descr, $sprite, $tags, $link)
385+
$getElementLine($baseShape, "system", $alias, $label, $type, $descr, $sprite, $tags, $link)
386386
!endprocedure
387387

388388
!unquoted procedure SystemDb($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="")
@@ -395,9 +395,9 @@ rectangle "$getPerson($label, $type, $descr, $sprite)$getProps()" $toStereos("ex
395395
$getElementLine("queue", "system", $alias, $label, $type, $descr, $sprite, $tags, $link)
396396
!endprocedure
397397

398-
!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $plant="rectangle")
398+
!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $baseShape="rectangle")
399399
' $type reuses $techn definition of $tags
400-
$getElementLine($plant , "external_system", $alias, $label, $type, $descr, $sprite, $tags, $link)
400+
$getElementLine($baseShape , "external_system", $alias, $label, $type, $descr, $sprite, $tags, $link)
401401
!endprocedure
402402

403403
!unquoted procedure SystemDb_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="")

C4_Sequence.puml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ $calcDescr
232232
$getParticipant("external_person", $alias, $label, $type, $descr, $sprite, $tags, $link)
233233
!endprocedure
234234

235-
!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $plant="rectangle")
235+
!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $baseShape="rectangle")
236236
' $type reuses $techn definition of $tags
237237
$getParticipant("system", $alias, $label, $type, $descr, $sprite, $tags, $link)
238238
!endprocedure
@@ -247,7 +247,7 @@ $calcDescr
247247
$getParticipant("system", $alias, $label, $type, $descr, $sprite, $tags, $link)
248248
!endprocedure
249249

250-
!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $plant="rectangle")
250+
!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="", $type="", $baseShape="rectangle")
251251
' $type reuses $techn definition of $tags
252252
$getParticipant("external_system", $alias, $label, $type, $descr, $sprite, $tags, $link)
253253
!endprocedure
@@ -264,7 +264,7 @@ $calcDescr
264264

265265

266266

267-
!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
267+
!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
268268
$getParticipant("container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
269269
!endprocedure
270270

@@ -276,7 +276,7 @@ $calcDescr
276276
$getParticipant("container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
277277
!endprocedure
278278

279-
!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
279+
!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
280280
$getParticipant("external_container", $alias, $label, $techn, $descr, $sprite, $tags, $link)
281281
!endprocedure
282282

@@ -290,7 +290,7 @@ $calcDescr
290290

291291

292292

293-
!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
293+
!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
294294
$getParticipant("component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
295295
!endprocedure
296296

@@ -302,7 +302,7 @@ $calcDescr
302302
$getParticipant("component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
303303
!endprocedure
304304

305-
!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $plant="rectangle")
305+
!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="", $baseShape="rectangle")
306306
$getParticipant("external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
307307
!endprocedure
308308

LayoutOptions.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -641,14 +641,14 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
641641
## Optional support of additional PlantUML elements
642642

643643
More often a full support of all PlantUML elements are requested.
644-
They can be set via the new optional `plant="...."` argument of the calls
644+
They can be set via the new optional `baseShape="...."` argument of the calls
645645

646-
- `System(..., ?plant)`,
647-
- `System_Ext(..., ?plant)`,
648-
- `Container(..., ?plant)`,
649-
- `Container_Ext(..., ?plant)`,
650-
- `Component(..., ?plant)`,
651-
- `Component_Ext(..., ?plant)`
646+
- `System(..., ?baseShape)`,
647+
- `System_Ext(..., ?baseShape)`,
648+
- `Container(..., ?baseShape)`,
649+
- `Container_Ext(..., ?baseShape)`,
650+
- `Component(..., ?baseShape)`,
651+
- `Component_Ext(..., ?baseShape)`
652652

653653
The already specified `...Db...()` and `...Queue...()` calls are not extended.
654654

@@ -680,11 +680,11 @@ but the style is not correct displayed.
680680
681681
Component(comp, "Copy component")
682682
683-
Component(config, "Config component", $plant="package")
683+
Component(config, "Config component", $baseShape="package")
684684
685685
ComponentDb(dbA, "DB A")
686-
' alternative syntax for ComponentDb() with $plant="database"
687-
Component(dbB, "DB B", $plant="database")
686+
' alternative syntax for ComponentDb() with $baseShape="database"
687+
Component(dbB, "DB B", $baseShape="database")
688688
689689
Rel_U(comp, config, "Configured by")
690690
Rel_L(comp, dbA, "Reads from")
@@ -694,7 +694,7 @@ SHOW_LEGEND()
694694
@enduml
695695
```
696696

697-
![Sample with PlantUML elements](https://www.plantuml.com/plantuml/png/NP1VQy8m5CNV-ockPJ05jGpsD11iDMmFiHF_u6D9cgXbRLAIspc__HBjIjtRpRs_Sy-vcLja1fkg30OaZHDAifZIR4tZT9SHIbOatMrX1Y_1e51vsGW9PyJQlaMHOPVfgS1pmnihJQuLIeNJN5THNJBbLquiYhBWqU9rilQj_Of65RCeZMjb2rtLMdbDxUs3xZtCNJM6SA7hA-H_tN3qYAXZSRf1lkXXOtYw-S_2ckLVx2GVX4i-53nskcK2iPiy0ojT7iMm-9PWhmhP3norWRvY11TtPxTNC6ISMHdsyWYUt9SclG0Tw19iP9djsyl-XM-C5C2lZl8GRQ5xp8ramiBHwAeTRxgnDpoO0gK5rDvY-_5vo2Xv9-boE0hcKWdthxy0)
697+
![Sample with PlantUML elements](https://www.plantuml.com/plantuml/png/NOzFQy904CNl-HHZA5H13OMU2eA9XlQmfk8VF8P9CcfeiXjs9xL---vMQqrly-VttioR6aRDRLrvlJW98n6deH3fKeJ99er5l8YJpHecyEJrIfbNRK5mP6xCIn1eF8qF9H_Rh3MaSoMP98zpLGTDXT9PZWmNLPa5i-VHqess2n7KQ9Yq7QKpLJTAEatZpdktlf_RQWZ-J3Ldo7-d_g2Bo7rvSD1FSOSDuI53G-iZDZJn6ym_y40TyJph5rbejVC8Ghjv1AoOj4GkFmdCMJ9-mLvfk5SCu6IpThmBP7Ij_sTjZQEBSNHxf0kxJrPKfTjhodz1Maq5P6TBEKXSeSkxAyB2m5wh-hfUtTRkw4wNJ0POkHFhj_TTAkBNE9dt1zwKPD7MrJS0)
698698

699699
### List of supported PlantUML elements
700700

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ SHOW_LEGEND()
235235
- Macros:
236236
- `Person(alias, label, ?descr, ?sprite, ?tags, ?link, ?type)`
237237
- `Person_Ext(alias, label, ?descr, ?sprite, ?tags, ?link, ?type)`
238-
- `System(alias, label, ?descr, ?sprite, ?tags, ?link, ?type, ?plant)`
238+
- `System(alias, label, ?descr, ?sprite, ?tags, ?link, ?type, ?baseShape)`
239239
- `SystemDb(alias, label, ?descr, ?sprite, ?tags, ?link, ?type)`
240240
- `SystemQueue(alias, label, ?descr, ?sprite, ?tags, ?link, ?type)`
241-
- `System_Ext(alias, label, ?descr, ?sprite, ?tags, ?link, ?type, ?plant)`
241+
- `System_Ext(alias, label, ?descr, ?sprite, ?tags, ?link, ?type, ?baseShape)`
242242
- `SystemDb_Ext(alias, label, ?descr, ?sprite, ?tags, ?link, ?type)`
243243
- `SystemQueue_Ext(alias, label, ?descr, ?sprite, ?tags, ?link, ?type)`
244244
- `Boundary(alias, label, ?type, ?tags, ?link)`
@@ -256,10 +256,10 @@ SHOW_LEGEND()
256256

257257
- Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml`
258258
- Additional Macros (based on context diagram macros):
259-
- `Container(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?plant)`
259+
- `Container(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?baseShape)`
260260
- `ContainerDb(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
261261
- `ContainerQueue(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
262-
- `Container_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?plant)`
262+
- `Container_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?baseShape)`
263263
- `ContainerDb_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
264264
- `ContainerQueue_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
265265
- `Container_Boundary(alias, label, ?tags, ?link)`
@@ -268,10 +268,10 @@ SHOW_LEGEND()
268268

269269
- Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml`
270270
- Additional Macros (based on container diagram macros):
271-
- `Component(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?plant)`
271+
- `Component(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?baseShape)`
272272
- `ComponentDb(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
273273
- `ComponentQueue(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
274-
- `Component_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?plant)`
274+
- `Component_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link, ?baseShape)`
275275
- `ComponentDb_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
276276
- `ComponentQueue_Ext(alias, label, ?techn, ?descr, ?sprite, ?tags, ?link)`
277277

0 commit comments

Comments
 (0)