add mermaid graph

This commit is contained in:
monoid 2022-04-22 15:53:54 +09:00
parent 6c21b03f10
commit d27d11d946
5 changed files with 101 additions and 12 deletions

View File

@ -4,3 +4,13 @@ language = "ko"
multilingual = false multilingual = false
src = "build" src = "build"
title = "Software Requirement Specification" title = "Software Requirement Specification"
[preprocessor]
[preprocessor.mermaid]
command = "mdbook-mermaid"
[output]
[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]

1
mermaid-init.js Normal file
View File

@ -0,0 +1 @@
mermaid.initialize({startOnLoad:true});

4
mermaid.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,10 @@
import { Issue } from "./githubType.ts"; import { Issue } from "./githubType.ts";
import { copy } from "https://deno.land/std@0.136.0/fs/mod.ts";
import { readAll } from "https://deno.land/std@0.135.0/streams/mod.ts" import { readAll } from "https://deno.land/std@0.135.0/streams/mod.ts"
import { parse as argParse } from "https://deno.land/std@0.135.0/flags/mod.ts"; import { parse as argParse } from "https://deno.land/std@0.135.0/flags/mod.ts";
import { normalize, join as pathJoin, fromFileUrl, parse as parsePath } from "https://deno.land/std@0.135.0/path/mod.ts"; import { normalize, join as pathJoin, fromFileUrl, parse as parsePath
, relative } from "https://deno.land/std@0.135.0/path/mod.ts";
import * as Eta from "https://deno.land/x/eta@v1.12.3/mod.ts"; import * as Eta from "https://deno.land/x/eta@v1.12.3/mod.ts";
async function readContent(path?: string): Promise<string> { async function readContent(path?: string): Promise<string> {
@ -121,6 +123,7 @@ async function main() {
} }
else{ else{
reloadAll = true; reloadAll = true;
break;
} }
} }
if (reloadAll) { if (reloadAll) {

View File

@ -15,6 +15,8 @@
## 3.4. 논리적 데이터베이스 요구사항(Logical database requirements) ## 3.4. 논리적 데이터베이스 요구사항(Logical database requirements)
> - 데이터베이스에 저장할 정보에 관한 논리적 요구사항을 지정해야 한다. > - 데이터베이스에 저장할 정보에 관한 논리적 요구사항을 지정해야 한다.
> - 논리적 요구사항의 종류 > - 논리적 요구사항의 종류
> 1. Types of information used by various functuons > 1. Types of information used by various functuons
@ -38,23 +40,92 @@
## 3.7. 상세 요구사항의 구성(Organizing the specific requirements) ## 3.7. 상세 요구사항의 구성(Organizing the specific requirements)
### 3.7.1. 시스템 모드(System mode) ### 3.7.1. 객체(Objects)
`production``development` 모드가 있다. 단순하게는 다음과 같은 UML을 그릴 수 있다.
```mermaid
classDiagram
class Document{
- URL path
- string[] tags
> - 일부 시스템은 운영 모드에 따라 상당히 다르게 작동할 수 있다. + renderChunk()
> - 예: 제어 시스템은 연습, 일반, 긴급 등의 여러 모드가 있을 수 있다. + remove()
+ addTag(name: string)
+ deleteTag(name: string)
+ async share(option: ShareOption): URL
+ renderNavigator()
}
class Chunk{
- id_t id
- Content data
- bool focused
- pos_t cursorPos
### 3.7.2. 사용자 부류(User class) + focus(index: number)
+ unfocus(index: number)
+ remove(index: number)
+ insertBefore()
+ draw()
+ drawPreview()
+ autoComplete(ctx: AutoCompleteContext)
+ swapWith(p : Chunk)
+ edit()
}
Document "1" <-- "n" Chunk : List
class Fileview{
+ listDirectory(path: URL)
+ open(path: URL)
+ remove(path: URL)
+ create(path: URL)
+ upload(file: Uint8Array| FileStream)
+ download(path: URL)
+ export(path: URL, option: ExportOption)
}
Fileview <.. Document : create
class StashList{
Content[] stash
int maxStash
createFromServer()
push(c: Content)
pop()
}
class DnDManager{
+ dropTo(Fileview)
+ dropTo(Document)
+ dropTo(Stash)
+ dragFrom(Fileview)
+ dragFrom(Document)
+ dragFrom(Stash)
}
DnDManager <.. Fileview : param
DnDManager <.. Document : param
DnDManager <.. StashList : param
class SearchManager{
search(query,option)
}
SearchManager <.. Document : return
```
> - 일부 시스템은 사용자의 부류에 따라 서로 다른 기능을 제공한다. ```mermaid
> - 예: 엘리베이터 제어 시스템은 승객, 정비원, 소방관에게 서로 다른 기능을 제공한다. classDiagram
class Management{
login(auth:Auth)
setServerConfigure(config: Configure)
setLocale(lang: string)
setTheme(theme: string)
getLocale()
getTheme()
getServerConfigure()
}
class Extension{
registerPlugin(plugin: Plugin)
}
```
### 3.7.2. 사용자 인터페이스 상세
### 3.7.3. 객체(Objects)
> - 객체는 시스템에서 현실 세계와 대응되는 개체이다.
> - 객체에는 각 각체의 상태(attributes) 및 객체의 행위(functions)가 포함된다.
> - 이러한 행위는 services, methods, processes라고도 한다.
### 3.7.4. 특징(Feature) ### 3.7.4. 특징(Feature)