demo_doc/puml/class-diagram-helper.puml
2021-06-25 21:37:59 +08:00

58 lines
2.4 KiB
Plaintext

@startuml class-diagram-helper
!define CLASS_LINE_FONT_SIZE 12
!define Link_(e_alias1, e_alias2, e_label, e_direction="") e_alias1 e_direction e_alias2 : "e_label"
!define Link_(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>//"
!define Link(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "-->")
!define Link(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "-->")
' 泛化 类继承
!define Generalize(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "--|>")
!define Generalize(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "--|>")
!define GeneralizeBack(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "<|--")
!define GeneralizeBack(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "<|--")
' 实现
!define Realize(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "..|>")
!define Realize(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "..|>")
!define RealizeBack(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "<|..")
!define RealizeBack(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "<|..")
' 聚合
!define Aggregation(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "--o")
!define Aggregation(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "--o")
!define AggregationBack(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "o--")
!define AggregationBack(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "o--")
' 组合
!define Composition(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "--*")
!define Composition(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "--*")
!define CompositionBack(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "*--")
!define CompositionBack(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "*--")
' 依赖
!define Dependency(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "..>")
!define Dependency(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "..>")
!define DependencyBack(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "<..")
!define DependencyBack(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "<..")
' 关联
!define Association(e_from,e_to, e_label) Link_(e_from,e_to, e_label, "--")
!define Association(e_from,e_to, e_label, e_techn) Link_(e_from,e_to, e_label, e_techn, "--")
@enduml