Skip to content

01. Overview

Duncan Crutchley edited this page Apr 21, 2019 · 23 revisions

This library (a.k.a. CoreLibrary) is a collection of useful C++1x utility classes and functions to assist with multi-threading, logging, networking, custom exceptions, file utilities, INI files, serialization, sorting, string utilities and so on. In other words a collection of code for general purpose use that is very helpful in many different C++ coding projects.

The code makes use of modern C++1x features, as well as templates and traditional object orientated techniques.

Here is a list of the current sub-libraries within this project.

  • Threads: Useful threading utility classes providing threaded base class, message queue thread, event triggered thread, as well as thread group management, thread-safe queue and a bounded buffer.
  • Serialisation : Utility functions and classes to simplify serialisation using either POD objects, Cereal serialisable objects or Google protocol buffers. This can easily be adapted to support Boost serialisation if required.
  • Async IO (ASIO): TCP clients and servers, UDP senders and receivers, multicast senders and receivers, various definitions, types and utilities.
  • Debug Log: Classes and macros to provide in-app debug log files using multi-threading, as well as a log as a singleton. Can also define custom formatter class to control look and feel of the log files.
  • CSV Grid: Classes to load CSV files into memory in a grid like structure and manipulate their contents and save back to disk. Includes specialisations for CSV files containing purely numerical contents.
  • Exceptions: Base class from which to derive custom exceptions that interface with standard and Boost exceptions.
  • File Utilities : Functions providing file and directory utilities, such as recursive searching, batch copying etc.
  • INI Files: Utility classes to load INI files into memory, easily manipulate the contents and save back to disk.
  • String Utilities : Various string related convenience utility functions for string formatting and conversion.
  • Sorting : Generic implementations of several sorting algorithms, more for demonstrative purposes than actual use.