- 1. Deployment_Node
- 2. Deployment_Node_L
- 3. Deployment_Node_R
- 4. Node
- 5. Node_L
- 6. Node_R
- 7. AddNodeTag
- 8. 代码示例
| 函数名 | Deployment_Node($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") | |
| 参数 | ||
| alias(必须) | 定义Person的一个别名,用于后续设计的调用 | |
| label(必须) | 用于定义在图形上显示的标签, 可以使用字符串,也可以直接输入 | |
| type | 为节点增加一个类型 | |
| descr | 增加对Container的详细描述 | |
| sprite | 为容器增加图标,C4 容器默认无图标 | |
| tags | 增加一个自定义的 tag, 默认tag为 Container | |
| link | 增加一个链接,实现点击跳转的功能 | |
2. Deployment_Node_L
| 函数名 | Deployment_Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") | |
| 参数 | 参见:Deployment | |
3. Deployment_Node_R
| 函数名 | Deployment_Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") | |
| 参数 | 参见:Deployment | |
4. Node
| 函数名 | Node($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") | |
| 参数 | 参见:Deployment | |
5. Node_L
| 函数名 | Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") | |
| 参数 | 参见:Deployment | |
6. Node_R
| 函数名 | Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") | |
| 参数 | 参见:Deployment | |
7. AddNodeTag
| 函数名 | AddNodeTag($tagStereo, $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="") | |
| 参数 | ||
| tagStereo(必须) | 设置一个标签的名称,用于后续的调用与显示,设置值为显示值 | |
| bgColor | 设置容器的背景颜色 | |
| fontColor | 设置容器的字体颜色 | |
| borderColor | 设置边框的颜色 | |
| shadowing | 是否显示阴影,true 或者 false | |
| shape | 为容器设置一个图标, 默认为直角 roundedBox 圆角 eightSided 斜角 | |
| sprite | 设置一个图标 | |
| techn | 为容器增加一个技术栈,如果在容器定义中重新声明则显示容器中的定义 | |
| legendText | 设置在图例中显示的标题 | |
| legendSprite | 设置一个在图例中显示的图标,默认为上面参数sprite设置的图标 | |
8. 代码示例
@startuml all !define RELATIVE_INCLUDE /Users/zhangwei/C4-PlantUML !include RELATIVE_INCLUDE/C4_Deployment.puml !includeAddNodeTag( nodeTag, $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR, $sprite=jenkins) Node(Dep_Node, "Node_L*** x2", "Windows", "两个windows节点,标签剧中", $tags=nodeTag){ Deployment_Node_L(Dep_Node_L, "Dep_Node_L*** x2", "Windows", "两个windows节点,标签靠左"){ Container(cont_l, "Container A", "C/C++","一个C4 Model 的容器") } Deployment_Node_R(Dep_Node_R, "Dep_Node_L*** x2", "Windows", "两个windows节点,标签靠右"){ Container(cont_r, "Container A", "C/C++","一个C4 Model 的容器") } Lay_R(Dep_Node_L, Dep_Node_R) } @enduml



