This is my Design Patterns repository containing state of the art examples of practical usage of Design Patterns in modern C++.
Design Patterns are typically split into three categories. This is called Gamma Categorization after Erich Gamma, one of Gang of Four authors.
- Creational Patterns:
- Deal with the creation (construction) of objects
- Explicit (constructor) vs. implicit (DI, reflection, etc.)
- Wholesale (single statement) vs. piecewise (step-by-step)
- Structural Patterns:
- Concerned with the structure (e.g. class members)
- Many patterns are wrappers that mimic the underlying class' interface
- Behavioral Patterns:
- They are all different - no central theme
Once you have successfully installed Bazel you can run the code using:
bazel test //creational_patterns/factory_pattern
You can use my following Docker image to instantiate a container locally with Ubuntu and Bazel already installed:
docker run -it --rm framaxwlad/ubuntu_dev:latest
There you can simply clone the repository:
git clone https://github.com/FBorowiec/design_patterns.git
cd design_patterns/
And use a bazel command to run the program:
bazel test //structural_patterns/exercises:structural_patterns_test