关于c++:22种设计模式的C实现

6次阅读

共计 429 个字符,预计需要花费 2 分钟才能阅读完成。

前言

1. 代码仓库

https://github.com/TOMO-CAT/C…

2. 前置常识

  • UML 类图与面向对象编程
  • 软件设计准则与 SOLID 准则

创立型模式

  1. 工厂办法模式(Factory Method)
  2. 形象工厂模式(Abstract Factory)
  3. 生成器模式(Builder)
  4. 原型模式(Prototype)
  5. 单例模式(Singleton)

结构型模式

  1. 适配器模式(Adapter)
  2. 桥接模式(Bridge)
  3. 组合模式(Composite)
  4. 装璜模式(Decorator)
  5. 外观模式(Facade)
  6. 享元模式(Flyweight)
  7. 代理模式(Proxy)

行为型模式

  1. 责任链模式(Chain of Responsibility)
  2. 命令模式(Command)
  3. 迭代器模式(Iterator)
  4. 中介者模式(Mediator)
  5. 备忘录模式(Memento)
  6. 观察者模式(Observer)
  7. 状态模式(State)
  8. 策略模式(Strategy)
  9. 模板办法模式(Template Method)
  10. 访问者模式(Vistor)
正文完
 0