コンテンツにスキップ

PlantUML

基本

コメントアウト ' Single Quotation
プレビュー Alt+D
  • PlantUML

    @startuml test
    skinparam dpi 300
    
    ' Write something here
    
    @enduml
    
  • MkDocs

    ''' mermaid
    ' Write something here
    '''
    

中身のみ記述

ディレクトリ構成

salt
{
    {T
        + [OUTPUT_DIR]
        ++ src      | ソース
        ++ doc      | ドキュメント
        ++ data     | データ
    }
}

オブジェクト図

object

object human{
    name = "hogehoge"
    age = 21
    - check?
}

arrow

object obj
object obj00
object obj01
object obj02
object obj03
object obj04
object obj05

obj --|> obj00
obj ..|> obj01
obj --> obj02
obj --* obj03
obj --o obj04
obj .. obj05 : label

map: 連想配列

map HumanData{
    name => string
    age => int
}
map DataObject{
    target *-> HumanData
    club => string
    birthday => DateTime
}

Json

json JsonData{
    "name": "string",
    "age": "int",
    "flag": ["flag1", "flag2", "flag3"]
}

YAML

@startyaml
skinparam dpi 300
<style>
yamlDiagram {
    highlight {
        BackgroundColor #1d1d1d
        FontColor white
        FontStyle italic
    }
}
</style>
#customHighlight "title"
#highlight "subtitle"
#highlight "type"/"bb"

title: Title of This
subtitle: Subtitle
type:
    aa:
        id: 01
    bb:
        id: 02
    cc:
        id: 03
    other:
        - hoge
        - fuga
@endyaml

Package

package UserInterface{
    package Windows{
        object DialogWin{
            message
        }
    }
    package Mac{
        object DialogMac{
            message
        }
    }
}

アクティビティ図

if文

start
if (Installed) then (<color:#0000aa>True)
    #LightGray:Skip to install;
    stop
else(<color:#aa0000>False)
    :Install app;
    :access to __url__;
endif
end

複数条件(垂直)

デフォルトは水平

!pragma useVerticalIf on
start
if (condition A) then (yes)
    :Text 1;
elseif (condition B) then (yes)
    :Text 2;
    stop
else (nothing)
    :Text else;
endif
end

switch, case, goto

start
switch(option)
case (A)
    :FunctionA;
    label A
    :do something;
case (B)
    :FunctionB;
    goto A
case (C)
    :FunctionC;
    goto A
case (else)
    :do nothing;
endswitch

Reference


最終更新日: August 14, 2023
作成日: August 14, 2023