Skip to content

gnbond/GLUCC

Repository files navigation

GLUCC - Greg's List of Useful C++ Classes

1. Introduction

This is a small collection of C++17 classes and templates that I have found useful in some of my personal projects. I've gathered them here in one place, with a very forgiving license, in the hope they may be useful to others.

The intent is that each class or template is more or less stand-alone with few or no dependencies. With the forgiving license, files (and their unit tests!) can just be copied into a target project and used. No need to install an entire library or manage an extra dependency just to get some small helper classes.

Each class is documented in the header with Doxygen. Each class should be comprehensively unit-tested using Catch2. A CMake-based build is included to built the documentation and unit tests but is not required to use any of these classes in your project.

2. Documentation

The documentation is in the docs/ directory, and can be accessed online via GLUCC Github Page. Doxygen-generated API is in the docs/doxygen directory.

3. Support

The long-term home of this project is on GitHub.

As stated in the License, this code is provided as-is with absolutely no warranty. That said, I am always happy to receive comments, suggestions, pull requests or issues on GitHub, tho I cannot promise timely responses.

4. The Templates

4.1. format_guard

An RAII helper that saves the IOStream formatting state then automatically reverts it on destruction.

4.2. optional_function

A std::function wrapper that is safe to call even if empty.

4.3. is_insertable_into

A type trait to detect if a type T is insertable into an iostreams-like stream S. This demonstrates some useful Template Meta-Programming techniques that can be simply adapted to implement a wide variety of type traits.

4.4. dereference_iterator

TBD

4.5. rectangular

TBD

5. The Classes

5.1. kerry::packer

Construct binary protocol packets in C++ style, without needing memcpy() or unsafe pointer casts. Still a work in progress.

5.2. james::unpacker

Unpack binary protocol packet in C++ style. TBD.

About

Greg's List of Useful C++ Classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published