#plantuml画图 PlantUML 是一个画图脚本语言,用它能够快速地画出:markdown
在markdown中的使用方式oop
##时序图code
@startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice <-- Bob: Another authentication Response @enduml
##流程图 流程标签以 : 开始,以 ; 结束,按其定义顺序隐式连接。 就是正常流程图判断是棱形,这个有点奇怪,简单的流程图能够画的比加快,可是复杂的多泳道,条件复杂的仍是用鼠标操做软件,我的认为可维护性更好一点,效率更高。blog
@startuml :Hello world; :I am cool; @enduml
可使用 start 和stop来表示图的开始和结束。it
@startuml start :Hello world; :I am cool; stop @enduml
也可使用endio
@startuml start :Hello world; :I am cool; end @enduml
使用if then elseclass
@startuml start if (ok?) then (yes) :process 1; else (no) :process2; endif stop @enduml
循环 repeat 和 While loop,repeat没发现能够在循环判断的时候写写文字说明效率
@startuml start repeat :foo as starting label; :read data; :generate diagrams; backward:This is backward; repeat while (more data?) stop @enduml
@startuml while (check filesize ?) is (not empty) :read file; endwhile (empty) :close file; @enduml
能够写一些注释:软件
@startuml start :foo1; floating note left: This is a note :foo2; note right This right note end note stop @enduml
使用管道|,您能够定义泳道:file
@startuml |Swimlane1| start :foo1; |#AntiqueWhite|Swimlane2| :foo2; :foo3; |Swimlane1| :foo4; |Swimlane2| :foo5; stop @enduml
展示的效果: