feature: design patter

This commit is contained in:
binpeng.liu
2023-10-31 15:17:07 +08:00
parent 4b8c957341
commit 32eda66409
29 changed files with 3809 additions and 16 deletions

View File

@@ -32,8 +32,12 @@
```
### 类别的作用
拓展当前类,为类添加方法
可以把类的实现分开在几个不同的源文件里,所以好处是:
- 减少耽搁文件的代码行数
- 可以把不痛的功能组织到不同的 category 里
- 可以由多个开发者共同完成一个大的类,方便协作
- 拓展当前类,为类添加方法
- 声明私有方法
### 类别的局限性