vault backup: 2022-06-14 15:53:24
Affected files: .obsidian/workspace 02. PARA/03. Resources(資源)/Design Pattern.md attachments/20220614154819_Observer_Pattern.png
This commit is contained in:
10
.obsidian/workspace
vendored
10
.obsidian/workspace
vendored
@@ -9,7 +9,7 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "02. PARA/03. Resources(資源)/C++17/lambda.md",
|
||||
"file": "02. PARA/03. Resources(資源)/Design Pattern.md",
|
||||
"mode": "source",
|
||||
"source": true
|
||||
}
|
||||
@@ -69,7 +69,7 @@
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "02. PARA/03. Resources(資源)/C++17/lambda.md",
|
||||
"file": "02. PARA/03. Resources(資源)/Design Pattern.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
@@ -86,7 +86,7 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "02. PARA/03. Resources(資源)/C++17/lambda.md"
|
||||
"file": "02. PARA/03. Resources(資源)/Design Pattern.md"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@
|
||||
},
|
||||
"active": "cfe19fa2de06a1e6",
|
||||
"lastOpenFiles": [
|
||||
"02. PARA/03. Resources(資源)/Design Pattern.md",
|
||||
"02. PARA/03. Resources(資源)/C++17/lambda.md",
|
||||
"02. PARA/03. Resources(資源)/C++17/C++17.md",
|
||||
"02. PARA/03. Resources(資源)/C++17/以值擷取(captured-by-value).md",
|
||||
@@ -124,7 +125,6 @@
|
||||
"02. PARA/01. Project(專案)/未命名.md",
|
||||
"02. PARA/01. Project(專案)/008. Sentinel.md",
|
||||
"02. PARA/03. Resources(資源)/99. templates/front matter.md",
|
||||
"02. PARA/03. Resources(資源)/Obsidian.md",
|
||||
"attachments/Pasted image 20201206094618.png"
|
||||
"02. PARA/03. Resources(資源)/Obsidian.md"
|
||||
]
|
||||
}
|
||||
@@ -131,3 +131,10 @@ class duckWood : public duck {
|
||||
![[Pasted image 20220526183019.png]]
|
||||
|
||||
這樣做的另一個好處是fly的初始化是動態的,只要再多一個`set()` function就可以動態的切換實作,也就是說你可以從設定檔來決定你的鴨子要長什麼樣子。
|
||||
|
||||
|
||||
## 觀察者模式(Observer Pattern )
|
||||
有一個會產生變動的主角(subject),與一堆需要觀察變動的「觀察者」。觀察者向主角註冊,當主角發生變化的時候,發後通知給觀察者。
|
||||
![[20220614154819_Observer_Pattern.png]]
|
||||
|
||||
其中
|
||||
BIN
attachments/20220614154819_Observer_Pattern.png
Normal file
BIN
attachments/20220614154819_Observer_Pattern.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user