Skip to content

A C++ 20/23 general purpose class library. 25 different modules cover areas from strings and formatting, over debug logging to expression-parser and file scanner. Supports C++20 module compilation with Clang.

License

Notifications You must be signed in to change notification settings

AlexWorx/ALib-Class-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 25 modules, each addressing different topics. A subset of the available modules can be selectively included in a custom library build. This means you only get what you choose from the menu.

New In this Version

Support of language version C++17 was dropped. With that:

  • All std::enable_if constructs (and similar) have been replaced it by C++20 Concepts.
  • Support for C++20 Modules was added. (This is in alpha state and works only on newest Clang compilers).

The latter was a little bit of a journey, and we have created a blog-page describing our experiences.

For more news, consult the Changelog.

ALib Homepage

Please find all about the ALib For C++, including

  • Programmer's Manuals
  • Reference Documentation
  • Tutorials
  • Project setup guide
  • Version History / Change log

at the ALib Homepage.

Some highlights of the functionality:

  • ALib Strings: String-types with interfaces similar to Java/C#, compatible with anything that "smells" like a string. (Technically achieved with template 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 Variables: 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 Format: Formatting of strings with Python-like and alternatively Java-like syntax.
  • 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 with standards C++20 and 23.
  • Modularization: Possible selective use and compilation of the library.
  • Extensive documentation.
  • Least intrusive: Designed to keep user code independent of ALib types and idioms when possible.
  • Ease of use by design. When things become complex, features are hidden behind default behavior and are only available to users who investigate deeper. For example, by consulting the detail chapters of the Programmer's Manuals. There is one available for each module.
  • Developed and steadily tested under GNU/Linux, Windows OS, macOS, and Raspberry Pi-devices. For details in respect to the current release, see the 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. Separated Programmer's Manuals are published with the ALib Homepage! One dedicated manual is provided for each ALib Module.

    The manuals are well-structured, provide step-by-step sourcecode tutorials and sometimes go into in-depth discussion 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 Changelog.

  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 with the output text snippets of the recent unit test run. (See an example here).

Summary: ALib comes with a complete book of documentation, which has more than 1000 pages if it was printed. It is all explained, for beginners and experts!

IDE / Build System Setup

The current Version got tested on the following platform combinations:

  • GNU/Linux Arch 6.16.8, Clang++ 20.1.8, C++20/23, 32-Bit / 64-Bit, optional C++20 Module Support
    (This is the main development platform.)
  • GNU/Linux Arch 6.16.8, GNU C++ 15.2.1, C++20/23, 32-Bit / 64-Bit
  • WindowsOS 11, MSC 19.44 (Visual Studio 2026 Insiders, Platform v145), C++20, 32-Bit/64-Bit
  • WindowsOS 11, MinGW, 64-Bit, GCC 13.47, C++20
  • macOS Tahoe 26.0, Apple M2 / ARM64, Apple Clang Version 17.0.0, C++20/23, 64-Bit
  • Raspberry 3, aarch64, Cortex-A53, GNU C++ 12.2.0, C++20/23
  • Raspberry 4, aarch64, Cortex-A72, GNU C++ 12.2.0, C++20/23
  • Raspberry 4, armhf (32-bit), Cortex-A72, GNU C++ 12.2.0, C++20/23

The Programmer's Manual contains an extensive chapter about 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.

License

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

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 to realize 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.

All Information

Please visit the ALib Homepage!

About

A C++ 20/23 general purpose class library. 25 different modules cover areas from strings and formatting, over debug logging to expression-parser and file scanner. Supports C++20 module compilation with Clang.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published