Skip to content

jakjan95/head-first-design-patterns-cpp

Repository files navigation

head-first-design-patterns-cpp

Head First Design Pattern but in C++

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.

Design Patterns by Categories

  • 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

Design Patterns by Book's chapters

Chapter 1

Strategy

Chapter 2

Observer

Chapter 3

Decorator

Chapter 4

Factory Method

Abstract Factory

Chapter 5

Singleton

Chapter 6

Command

Chapter 7

Adapter

Facade

Chapter 8

Template Method

Chapter 9

Iterator

Composite

Chapter 10

State

Chapter 11

Proxy

Chapter 12

Compoud Patterns (6 Patterns together in one example)

MVC

Chapter 14 Other GoF Patterns

Patterns below was mentioned by just short description without code examples.

  • Bridge
  • Builder
  • Chain of Responsibility
  • Flyweight
  • Interpreter
  • Mediator
  • Memento
  • Prototype
  • Visitor

Contribution

If you see any error or stuff like that please report Issue :)