Skip to content

petermost/CppAidKit

Repository files navigation

C++ AidKit

A C++ library which contains C++20/Qt/CMake aid classes/scripts. The documentation is somewhat lacking, but all classes have unittests and should therefore function as documentation.

If somebody else, besides me 😉, should actually use the AidKit-library, let me know and I start working on the documentation.

Some notable classes:

Standard classes:

  • data_mutex: Wrapper around a thread shared resource which ensures at comple time, when accessing the resource, the corresponding mutex is locked.
  • file: A RAII wrapper around std::FILE * functions. It also returns or throws a std::error_code instead of setting std::errno.
  • file_error: A customized std::error_code for the above mentionded file class.
  • file_ptr: A simple alias for a std::unique_ptr<> with a custom deleter which closes the std::FILE *.
  • enum_class: A Java inspired enum class which allows searching/printing etc.
  • enum_flags: Define flags like enums and test it with normal bit test operations.
  • errno.hpp: Create a std::error_code from errno.
  • system_error: Utility functions for throwing a std::system_error when an std::error_code was returned.

Qt classes:

CMake scripts:

  • CMakeLists.txt: A (hopefully) exemplary CMake build script for a library build.
  • output_options.cmake: Build all targets into the build directory.
  • rpath_options.cmake: Setup rpath so shared libraries are searched in the current directory (and ./lib for Qt libraries).

About

A C++ library which contains various aid classes

Resources

License

Stars

Watchers

Forks