Skip to content

yuriysydor1991/cpp-app-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

282 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your neat C++ application template project

Goal of the template project

Project is designed to increase the speed of the application creation process at the project startup by providing templated application structure. So developer may just jump straight into implementing a particular application with no or minimum project start structure set up.

Helps you go beyond raw code — build a complete, ready-to-ship software product fast!

Enables rapid creation of a complete software product — not just raw code or a simple program.

Just fork it and implement application straight away!

The template project is not a framework in traditional means so infrastructure implementation items may be altered to fit needs or even erased in case of redundancy.

See more at the kytok.org.ua

💵 Donate at http://kytok.org.ua/page/pozertvy

The template project flavors

Examine available branches to find your most applicable variant of the template or combine multiple branches by merging them to assemble the best suited template structure for your needs:

Basic application infrastructure

  • main branch at [GitHub, GitLab] (current) just the clear main function and all available CMake integrations with no additional app infrastructure classes.
  • app branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable.
  • applib branch at [GitHub, GitLab] for the application binary with additional separate library binary and header files (available for the installation) in order to provide library's code reusability across multiple applications.
  • lib branch at [GitHub, GitLab] for the library with the headers include files (and documentation) without target binary.
  • appMeson branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with the Meson build system.
  • applibMeson branch at [GitHub, GitLab] for the application binary with additional separate library binary and header files (available for the installation) in order to provide library's code reusability across multiple applications, built with the Meson build system and detectable by downstream Meson projects via dependency() (pkg-config) with optional CMake find_package() support.
  • libMeson branch at [GitHub, GitLab] for the library with the headers include files (and documentation) without target binary, built with the Meson build system and detectable by downstream Meson projects via dependency() (pkg-config) with optional CMake find_package() support.

Logging messages

  • appLog4Cpp5 branch at [GitHub, GitLab] the template infrastructure to fast start the application development with the log4cpp extended logging library.
  • appBoostLog branch at [GitHub, GitLab] the template infrastructure to fast start the application development with the Boost.Log extended logging library.

Windowing / GUI

  • appQt6 branch at [GitHub, GitLab] for the application general classes with additional defined structure for the Qt6 QML window application development.
  • appGtkmm3 branch at [GitHub, GitLab] for the application general classes with additional defined structure for the Gtkmm-3.0 with C++ window application development.
  • appGtkmm3Glade branch at [GitHub, GitLab] for the application general classes with additional defined structure for the C++ application development with Gtkmm-3.0 and Glade application with XML UI creation.
  • appGtkmm4 branch at [GitHub, GitLab] for the application general classes with additional defined structure for the Gtkmm-4 with C++ window application development.
  • appwxWidgets branch at [GitHub, GitLab] for the application general classes with additional defined structure for the wxWidgets cross-platform C++ window application development, provided through CMake FetchContent.

3D / OpenGL

  • appSDL3 branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with a SDL3 library for the OpenGL 3D development and more!
  • appSDL2 branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with a SDL2 library for the OpenGL 3D development and more!
  • appGtkmm4GLArea branch at [GitHub, GitLab] with general application related classes to generate a single binary executable that embeds raw OpenGL rendering inside a Gtkmm-4 window with the native Gtk::GLArea widget.
  • appQt6GLArea branch at [GitHub, GitLab] with general application related classes to generate a single binary executable that embeds raw OpenGL rendering inside a Qt6 QML window with a QQuickFramebufferObject scene-graph item.
  • appSFML branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with the SFML multimedia library (2D graphics, windowing, input and OpenGL access) provided through the system package or the CMake FetchContent fallback.
  • appFreeGlut branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with a FreeGlut library for the OpenGL 3D development.

Web / HTTP / Net

  • appWt4 branch at [GitHub, GitLab] the template infrastructure to fast start Web application developing based on the Wt C++ full stack framework.
  • appBoostBeast branch at [GitHub, GitLab] the template infrastructure for the Web application fast start development with the Boost Beast HTTP server.
  • appCURL branch at [GitHub, GitLab] the template infrastructure to fast start the application development with the CURL multi protocol client library (including the HTTP) to download data from the network.

Database Management systems (DBMS) / SQL / NoSQL

Data Visualization / Plots / Graphs

  • appMatPlotxx branch at [GitHub, GitLab] the template infrastructure to fast start application development with the MatPlot++ usage - a nice plot library with required gnuplot application and Qt6.
  • appPLplot branch at [GitHub, GitLab] the template infrastructure to fast start application development with the PLplot usage - a powerful plotting library used in scientific applications with a lot of windowing and language bindings and export capabilities (PNG, SVG, JPEG, GIF, PDF and more).
  • appQt6ChartView branch at [GitHub, GitLab] the template infrastructure to fast start data visualization and plotting right inside a Qt6 QML window with the native ChartView element from the QtCharts module.

Maps

  • appGtkmm4LeafLet branch at [GitHub, GitLab] with general application related classes to generate a single binary executable with usage of Gtkmm-4 with WebKitGtk and LeafLet maps.
  • appQt6LeafLet branch at [GitHub, GitLab] with general application related classes to generate a single binary executable with usage of Qt6 and QML with WebView QML and LeafLet maps.
  • appQt6QtLocation branch at [GitHub, GitLab] with general application related classes to generate a single binary executable that renders OpenStreetMap tiles natively inside a Qt6 QML window with the native Map element from the Qt Location module (the native counterpart of the WebView based appQt6LeafLet branch).

Computer Vision / Image Processing

  • appOpenCV branch at [GitHub, GitLab] the template infrastructure to fast start application development with the OpenCV computer vision library.

System / DBus

  • appSDBusCxxClient branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with the usage of Kistler-Group's sdbus-c++ library as a DBus services client.
  • appSDBusCxxServer branch at [GitHub, GitLab] with just general application related classes to generate a single binary executable with the usage of Kistler-Group's sdbus-c++ library as a server on the DBus.
  • appQt6QtDBusClient branch at [GitHub, GitLab] with general application related classes to generate a single binary executable that reads the general system information from systemd-hostnamed over the DBus with the native Qt6 QtDBus module and shows it in the QML window (the Qt6 framework counterpart of the sdbus-c++ based appSDBusCxxClient branch).

Alter current README.md and a CHANGELOG.md files to match your implementation introduced into the destination new project. Examine the doc directory for possible translations of a current md document:

Documentation contents

Document is under the refinement

  1. Cloning the C++ template project
  2. Forking and replacing the origin
  3. Requirements
    1. Required tools for the GNU/Linux based OS
    2. Required tools for the MS Windows based OS
    3. Optional for the tests
    4. Optional for the documentation
    5. Optional for the code formatting
    6. Optional for the code analyzer (cppcheck)
    7. Optional for the code analyzer with clang-tidy
    8. Optional for the memory check with Valgrind
    9. Optional for the flatpak packager
    10. Optional for the Docker container runs
    11. Optional for the snap packager
  4. Project structure
    1. Implement code straight away!
    2. Changing the project and executable name
    3. Version tracking and other project parameters
    4. Minimal possible versions
    5. Project tests
      1. Google Test
    6. Extensions
  5. Project build
    1. IDE build
    2. Command line build
    3. Enabling testing
      1. Enabling unit testing
      2. Disabling system GTest probe
    4. Documentation build
    5. Configuring the documentation install support
    6. Enabling and performing code formatting target
    7. Enabling the static code analyzer target with cppcheck
    8. Enabling the static code analyzer with clang-tidy
    9. Enabling the dynamic memory check target with valgrind
    10. Enabling DEB package generation with cpack
    11. Enabling the flatpak package generation support
    12. Enabling the Docker container build and run
    13. Enabling sanitizers
    14. Enabling the libcurl
    15. Enabling gprof profiler analysis
    16. Enabling vagrind's callgrind profiler analysis
    17. Enabling Jenkins pipeline inside Docker container
    18. Enabling the nlohmann json library
    19. Enabling the snap packager
    20. Enabling FreeBSD pkg package generation with cpack
    21. Enabling WIX MSI package generation with cpack
    22. Enabling RPM package generation with cpack
    23. Enabling the zlib library
    24. Enabling the libpng library
    25. Enabling the libjpeg library
    26. Enabling the libwebp library
    27. Enabling the lunasvg library (SVG)
    28. Enabling the giflib library (GIF)
    29. Enabling the libtiff library (TIFF)
    30. Enabling the OpenEXR library (EXR / HDR)
    31. Enabling the OpenJPEG library (JPEG 2000)
    32. Enabling the libavif library (AVIF)
    33. Enabling the libheif library (HEIF/HEIC)
  6. Run the executable
    1. IDE run
    2. Command line run
      1. Searching for the generated executable
      2. Starting the generated executable
    3. Tests run
      1. Run tests by the ctest
  7. Installing