This repository consist examples from the book Head First Design Patterns but written in modern C++. For most of the examples build system is cmake so they can be simple build by below set of command:
mkdir build
cd build
cmake ..
make
Examples without cmake system build can be build from command line or just by type make
if they consist of Makefile.
- Creational Patterns involve object instantion and all provide a way to decouple a client from the objects it needs to instantiate.
- Structural Patterns let you compose classes or objects into larger structures.
- Behavioral Patterns define how classes and objects interact and distribute resposibility.
Creational | Structural | Behavioral |
---|---|---|
Factory Method | Decorator | Strategy |
Abstract Factory | Adapter | Observer |
Singleton | Facade | Command |
Buidler | Composite | Template Method |
Prototype | Proxy | Iterator |
Bridge | State | |
Flyweight | Mediator | |
Memento | ||
Visitor | ||
Interpreter | ||
Chain Of Responsibility |
Proxy
Compoud Patterns (6 Patterns together in one example)
MVC
Patterns below was mentioned by just short description without code examples.
- Bridge
- Builder
- Chain of Responsibility
- Flyweight
- Interpreter
- Mediator
- Memento
- Prototype
- Visitor
If you see any error or stuff like that please report Issue :)