Skip to content

daileyet/designpattern4cplusplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design pattern for C++

创建模式

创建型模式关注对象的创建过程,在软件开发中应用非常广泛。 创建型模式描述如何将对象的创建和使用分离,让用户在使用对象过程中无须关心对象的创建细节,从而降低系统耦合度,并且让系统易于修改和扩展。

简单工厂 Simple Factory

工厂方法模式 Factory Method

抽象工厂模式 Abstract Factory

建造者模式 Builder

原型模式 Prototype

单例模式 Singleton

结构模式

结构型模式主要用于处理类或对象的组合。

适配器模式 Adapter

桥接模式 Bridge

组合模式 Composite

装饰模式 Decorator

外观模式 Facade

享元模式 Flyweight

代理模式 Proxy

行为模式

行为型模式主要用于描述对类或对象怎样交互和怎样分配职责。

责任链模式 Chain of Responsibility

命令模式 Command

解释器模式 Interpreter

迭代器模式 Iterator

中介者模式 Mediator

备忘录模式 Memento

观察者模式 Observer

状态模式 State

策略模式 Strategy

模板方法模式 Template Method

访问者模式 Visitor

参考

C++设计模式