Skip to content

Code for the Design Patterns in Modern C++ course from Udemy.

Notifications You must be signed in to change notification settings

mpavezb/cpp_design_patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp_design_patterns

Code for the Design Patterns in Modern C++ course from Udemy.

Design patterns are common architectural approaches. They were popularized by the Gang of Four book (1994) for Smalltalk and C++.

Gamma Categorization

They are tipically split into three categories. This is called Gamma Categorization after Erich Gamma, one of the GoF authors.

Creational Patterns

  • Deal with the creation of objects.
  • Explicit vs. Implicit: Constructor vs. [Dependency Injection, reflection, ...].
  • Wholesale vs. piecewise initialization.

Structural Patterns

  • Concerned with the structure (e.g., class members).
  • Many patterns are wrapers that mimic the underlying class interface.
  • Stress the importance of godd API design. Make API usable for other people.

Behavioral Patterns

  • They are all different; no central theme.
  • They solve particular problems.

Principles and Patterns

Building the code

sudo apt install libboost-serialization-dev
sudo apt install gcc-10 g++-10 # C++20

mkdir -p build && cd build
cmake -D CMAKE_C_COMPILER=gcc-10 -D CMAKE_CXX_COMPILER=g++-10 -DCMAKE_INSTALL_PREFIX=../bin .. && make
make install

About

Code for the Design Patterns in Modern C++ course from Udemy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published