# design-patterns-cpp-23 **Repository Path**: fengsheng06/design-patterns-cpp-23 ## Basic Information - **Project Name**: design-patterns-cpp-23 - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-25 - **Last Updated**: 2024-10-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## C++ Design Patterns C++ Implementation for 23 Design Patterns #### Creational Patterns - [Abstract Factory], families of product objects ![image](./images/AbstractFactory.png) - [Builder], how a composite object gets created ![image](./images/Builder.png) - [Factory Method], subclass of object that is instantiated ![image](./images/Factory.png) - [Prototype], class of object that is instantiated ![image](images/Prototype.png) - [Singleton], the sole instance of a class ![image](./images/SingletonPattern.png) #### Structural Patterns - [Adapter], interface to an object ![image](./images/Adapter.png) - [Bridge], implementation of an object ![image](./images/Bridge.png) - [Composite], structure and composition of an object ![image](./images/Composite.png) - [Decorator], responsibilities of an object without subclassing ![image](./images/Decorator.png) - [Façade], interface to a subsystem ![image](./images/Facade.png) - [Flyweight], storage costs of objects ![image](./images/Flyweight.png) - [Proxy], how an object is accessed (its location) ![image](./images/Proxy.png) #### Behavioral Patterns - [Chain of Responsibility], object that can fulfill a request ![image](./images/ChainOfResponsibility.png) - [Command], when and how a request is fulfilled ![image](./images/Command.PNG) - [Interpreter], grammar and interpretation of a language ![image](./images/Interpreter.PNG) - [Iterator], how an aggregate's elements are accessed ![image](./images/Iterator.png) - [Mediator], how and which objects interact with each other ![image](./images/Mediator.PNG) - [Memento], what private information is stored outside an object, and when ![image](./images/Memento.PNG) - [Observer], how the dependent objects stay up to date ![image](./images/Observer.PNG) - [State], states of an object ![image](./images/State.PNG) - [Strategy], an algorithm ![image](./images/Strategy.PNG) - [Template Method], steps of an algorithm ![image](./images/TemplateMethod.png) - [Visitor], operations that can be applied to objects without changing their classes ![image](./images/Visitor.PNG) ### References Design patterns in this repository are based on * [Design Patterns by The "Gang of Four"] * [Design Patterns in C++] * [Wikipedia] * [Design Patterns] [Design Patterns by The "Gang of Four"]: https://en.wikipedia.org/wiki/Design_Patterns [Design Patterns in C++]: https://github.com/JakubVojvoda/design-patterns-cpp [Wikipedia]: https://en.wikipedia.org/wiki/Software_design_pattern [Design Patterns]: https://refactoring.guru/design-patterns [Abstract Factory]: https://github.com/Junzhuodu/design-patterns/tree/master/CreationalPatterns/abstract-factory [Builder]: https://github.com/Junzhuodu/design-patterns/tree/master/CreationalPatterns/builder [Factory Method]: https://github.com/Junzhuodu/design-patterns/tree/master/CreationalPatterns/factory-method [Prototype]: https://github.com/Junzhuodu/design-patterns/tree/master/CreationalPatterns/prototype [Singleton]: https://github.com/Junzhuodu/design-patterns/tree/master/CreationalPatterns/singleton [Adapter]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/adapter [Bridge]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/bridge [Composite]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/composite [Decorator]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/decorator [Façade]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/facade [Flyweight]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/flyweight [Proxy]: https://github.com/Junzhuodu/design-patterns/tree/master/StructuralPatterns/proxy [Chain of Responsibility]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/chain-of-responsibility [Command]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/command [Interpreter]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/interpreter [Iterator]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/iterator [Mediator]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/mediator [Memento]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/memento [Observer]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/observer [State]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/state [Strategy]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/strategy [Template Method]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/template-method [Visitor]: https://github.com/Junzhuodu/design-patterns/tree/master/BehaviroalPatterns/visitor