zoukankan      html  css  js  c++  java
  • PlantUML——4.实例演示1

    给自己发消息

    @startuml
    
    Alice -> Alice : This is a signal to self.
    It also demonstrates 
    multiline text.
    
    @enduml
    demo07

    各种参与者

    @startuml
    title 各种参与者
    
    '角色
    actor Foo1        
    '边界
    boundary Foo2    
    '控制
    control Foo3    
    '实体
    entity Foo4        
    '数据库
    database Foo5
    '一般参与者
    participant Foo6    
    
    Foo1 -> Foo2 : To boundary
    Foo1 -> Foo3 : To control
    Foo1 -> Foo4 : To entity
    Foo1 -> Foo5 : To database
    Foo1 -> Foo6 : To participant
    
    @enduml
    demo04

    各种箭头

    @startuml
    
    title 各种箭头
    
    /'
    • add a final x to denote a lost message
    • use  or / instead of < or > to have only the bottom or top part of the arrow
    • repeat the arrow head (for example, >> or //) head to have a thin drawing
    • use -- instead of - to have a dotted arrow
    • add a final ”o” at arrow head
    • use bidirectional arrow
    '/
    
    actor Bob as B
    actor Alice as A
    
    B ->x A
    B ->  A
    B ->> A
    B -  A
    B \- A
    B //--A
    
    B ->o A
    B o\--A
    
    B <-> A
    B <->o A
    
    @enduml
    demo08

    小综合

    @startuml
    '标题
    title 综合:标题、别名、序列、颜色、图列
    
    '别名,配色
    actor Bob as B #red
    actor Alice as A #green
    
    '消息序列编号
    autonumber 2
    
    ’箭头颜色
    B -[#red]> A : hello
    B --[#black]> A : hello2
    B <[#0000FF]- A : ok
    
    '图例说明
    legend right
    这是一个图例说明
    endlegend
    
    @enduml
    demo10
  • 相关阅读:
    Substrings(hdu 4455)
    打砖块(codevs 1257)
    AFO
    愿 你 出 走 半 生 , 归 来 仍 是 少 年
    洛谷 2691逃离
    51Nod 1021 石子归并
    洛谷 P3047 [USACO12FEB]附近的牛Nearby Cows
    codevs 2072 分配房间
    codevs 1388 砍树
    codevs 1288 埃及分数
  • 原文地址:https://www.cnblogs.com/huntdream/p/4007272.html
Copyright © 2011-2022 走看看