# design-pattern **Repository Path**: xisobreaker/design-pattern ## Basic Information - **Project Name**: design-pattern - **Description**: 设计模式 C++ 代码示例 - **Primary Language**: C/C++ - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2023-07-04 - **Last Updated**: 2025-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: Cpp ## README # simplest-design-pattern [https://refactoring.guru/design-patterns/cpp](https://refactoring.guru/design-patterns/cpp) ## 项目说明 各代码目录内包含 plantuml,在 vscode 下安装 PlantUML 插件即可浏览 uml 类图。 ## 设计模式 > 设计模式共分为三大类:创建型模式、结构型模式、行为型模式。 #### 创建型模式(Creational Patterns) > 创建型模式提供创建对象的机制,能够提升已有代码的灵活性和可复用性。 * [工厂模式(Factory Pattern)](/Factory/README.md) * [抽象工厂模式(Abstract Factory Pattern)](/AbstractFactory/README.md) * [建造者模式(Builder Pattern)](/Builder/README.md) * [原型模式(Prototype Pattern)](/Prototype/README.md) * [单例模式(Singleton Pattern)](/Singleton/README.md) #### 结构型模式(Structural Patterns) > 结构型模式关注对象之间的组合和关系,这类模式能够将对象和类组装成较大的结构, 并同时保持结构的灵活和高效。 * [适配器模式(Adapter Pattern)](/Adapter/README.md) * [桥接模式(Bridge Pattern)](/Bridge/README.md) * [组合模式(Composite Pattern)](/Composite/README.md) * [装饰器模式(Decorator Pattern)](/Decorator/README.md) * [外观模式(Facade Pattern)](/Facade/README.md) * [享元模式(Flyweight Pattern)](/Flyweight/README.md) * [代理模式(Proxy Pattern)](/Proxy/README.md) #### 行为型模式(Behavioral Patterns) > 行为型模式关注对象之间的通信和交互,旨在解决对象之间的责任分配和算法的封装。 * [责任链模式(Chain of Responsibility Pattern)](/ChainOfResponsibility/README.md) * [命令模式(Command Pattern)](/Command/README.md) * [解释器模式(Interpreter Pattern)](/Interpreter/README.md) * [迭代器模式(Iterator Pattern)](/Iterator/README.md) * [中介者模式(Mediator Pattern)](/Mediator/README.md) * [备忘录模式(Memento Pattern)](/Memento/README.md) * [观察者模式(Observer Pattern)](/Observer/README.md) * [状态模式(State Pattern)](/State/README.md) * [策略模式(Strategy Pattern)](/Strategy/README.md) * [模板模式(Template Pattern)](/Template/README.md) * [访问者模式(Visitor Pattern)](/Visitor/README.md)