Skip to content

hugorbarbosa/cpp-design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Software design patterns in C++

This is still work in progress.

This project describes and implements software design patterns using Modern C++.

Table of contents

Project structure

This project is structured as follows:

Requirements

These tools need to be installed on the system for compilation of this project:

  • CMake: system to manage the build process.
  • C++ compiler: for software compilation (examples: Microsoft Visual C++ (MSVC), GCC and Clang).

Compilation

The following commands can be utilized to configure the project (example for the Debug build type):

$ cd <project-directory>
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug

To compile the software, use the CMake build command:

$ cmake --build . -j 4

Running

After compiling the project, an executable file is created for each design pattern, and can be run using the following command, where <DesignPatternExe> corresponds to the executable file of each design pattern, e.g., Strategy (note that some configuration generators (e.g., Visual Studio) may add a configuration folder (e.g., Debug) in the path, represented with [config] in the command):

$ cd build
$ ./bin/[config]/<DesignPatternExe>

License

Licensed under the MIT license.

References

  • Klaus Iglberger, C++ Software Design: Design Principles and Patterns for High-Quality Software.
  • Dmitri Nesteruk, Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design.
  • Robert C. Martin, Clean Architecture: A Craftsman's Guide to Software Structure and Design.

About

Software design patterns in C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages