ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
Overview

Abstract

ALib is a general purpose, use-case agnostic, platform-independent, low-level C++ class library.

Its mission is to provide foundational concepts, types and idioms relevant to any C++ project. As of today, ALib consists of 15 modules, each addressing different topics.
A subset of the available modules can be selectively included in a custom library build. This means, you just get what you choose from the menu.

Some highlights of the functionality:

  • ALib Strings: String-types with interfaces similar to Java/C#, compatible with anything that "smells" like a string (due to some template meta programming magic).
  • ALib Boxing: Consider this "std::any on steroids".
  • ALib Enums: Finally, we get what we expected from C++ enums.
  • ALib Monomem: Monotonic allocation with recycling. Why use the oh-so-slow heap?
  • ALib ALox: Logging for adults.
  • ALib BitBuffer: Write bit-streams instead of human-readable text.
  • ALib CLI: Command line parser with support of environment variables and configuration files.
  • ALib Expressions: Type-safe run-time expression compiler. Easily extensible to support your custom expression functions. 130+ (optional) predefined functions (math, string compare, date/time, etc.)
  • ALib Configuration: Run-time variables for C++. Its priority-management allows hard-coding defaults and having them be overridden by configuration files, environment-variables or command-line parameters.
  • ALib Files: A directory and file scanner (with run-time expression support).
  • ALib ThreadModel: A dynamic thread-pool implementation, dedicated worker threads with prioritized job-management, and periodic event-triggering.
  • And last but not least: Many more tools like managing bootstrapping of C++ software, externalized resources, configuration data, singletons with Windows DLLs, ...

Main Characteristics And Design Goals

  • ALib is free software.
  • Compiles and tested with C++ 17, 20 and 23.
  • Modularization: Possible selective use of only parts of the library.
  • Extensive documentation.
  • Least intrusive: Designed to keep user code as independent of ALib types and idioms as possible.
  • Ease of use by design.
    When things become complex, features are hidden behind default behavior and are only available to users who read the detail chapters of the various Programmer's Manuals. 😅
  • Developed and steadily tested under GNU/Linux, Windows OS, Mac OS, and Raspberry. For details in respect to the current release, see section below.

Documentation

The following documentation is provided.

  1. A General Library Manual is available describing the library structure, its setup and compilation, bootstrapping, etc.
  2. Fifteen separated Programmer's Manuals are published on this website! (One for each ALib Module).
    The manuals are well-structured, provide step-by-step source-code tutorials and often go into in-depth discussions in respect to design decisions and overall rationals behind important features of the ALib Modules.
  3. Reference Documentation which is covering 100% of the provided types, members, functions, namespaces, macros, etc. In short, each and every C++ entity is documented.
  4. A detailed version history, documenting every interface change is found in the Change Log.
  5. All documentation provided leverages the full power of Doxygen (the industry standard). Therefore, changes in the library's interfaces are always detected and corrected. The many code samples are implemented as unit tests and thus are "live"-integrated to the documentation, often together with the output text snippets of the recent unit test run. (See an example here.)
Note
Summary: ALib comes with a complete book of documentation, which has more than 1000 pages if printed. Its all explained, for beginners and experts!

IDE / Build System Setup

The current release got tested on the following platform combinations:

  • GNU/Linux Arch 6.12.1, GNU C++ 14.2.1 / Clang++ 18.1.8, C++ 17/20/23, 32-Bit / 64-Bit
    (This is the main development platform.)
  • WindowsOS 10/11, MSC 19.42 (Visual Studio 2022), C++ 17/20, 32-Bit / 64-Bit
  • WindowsOS 10/11, MinGW, GCC 13.47 C++ 17/20, 64-Bit
  • macOS Sequoia 15.2, Apple M2 / ARM64, Apple Clang Version 16.0.0, C++ 17/20/23, 64-Bit
  • Raspberry 3, ARM, 64-bit OS, GNU C++ 12.2.0, C++ 17/20/23
  • Raspberry 4, ARM, 64-bit OS, GNU C++ 12.2.0, C++ 17/20/23

Check out chapter 6. Building The Library for details of how to compile and use ALib in your C++ environment.

C# and Java Versions Of ALib

Parts of ALib have sibling incarnations in programming languages C# and JAVA. Historically, ALib aimed to be a cross platform/cross language library. This goal was (mostly) dropped in favor to be able to independently develop ALib for C++.

ALib for C# and ALib for Java are included in and distributed with the cross platform ALox Logging Library .

For C++, since May 2018 release, the situation was inverted: Instead of having ALib bundled with ALox, the logging library is now an ALib Module.

License

ALib is free software, can be downloaded at Github and sources are published under Boost Software License:

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Library Dependencies

ALib compiles as is, hence it is not dependent on any 3rd-party library. Optional dependencies exist. For example if boost is available, ALib Strings are using its regex search.
In contrast, ALib provides optional compatibility headers for 3rd-party libraries (e.g., QT Class Library ), which for example provide adoptions of ALib type-traits for QT-types.

Contributions

We would be happy, if the community started to support this library and are willing to receive contributions and, if accepted, to update the code accordingly.
Note that for legal reasons, we hereby explicitly refuse and reject code (or ideas for code) that are not explicitly provided under the Boost Software License. Please do not even contact us with your ideas/code in that case.

Thanks

Our thanks go to all supporters that did and do help realizing this project. Furthermore to just all of these millions of supporters of free software, including:

Special thanks also to C. Darwin, who created life on earth hundreds of millions of years ago, until he - when things became too crazy - disappeared in 1882.