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:
- 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 astd::error_code
instead of settingstd::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 thestd::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 anstd::error_code
was returned.
- DirectoryGuide/DirectoryVisitor: Allow traversing a directory tree.
- hton/ntoh: Functions to convert from host to network byte order and vice versa based on the size of the type.
- 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).