![]() |
XTL
0.1
eXtended Template Library
|
View the documentation online at http://djmott.github.io/xtl
View the github project at https://github.com/djmott/xtl
XTL is a series of C++ template metaprogramming patterns, idioms, algorithms and libraries that solve a variety of programming tasks. It supplements, extends and cooperates with the STL by providing some frequently used components that are otherwise absent from the standard. A short list of some of the more notable headers:
Header | Description |
---|---|
callback.hpp | single producer notifies multiple consumers of an event |
dynamic_library.hpp | load and invoke methods in a dynamic library |
parse.hpp | text parsing and AST generation |
socket.hpp | general purpose socket communication |
source_location.hpp | maintains info about locations within source code |
spin_lock.hpp | simple user mode spin lock based on std::atomic |
string.hpp | advanced and common string handling |
tuple.hpp | manipulate and generate tuples |
unique_id.hpp | global unique identifier / universal unique identifier data type |
var.hpp | multi-type variant using type-erasure |
XTL works with modern C++11 compilers and has been tested with MinGW, GCC, Intel C++, Cygwin and Microsoft Visual C++. The library can be used out-of-the-box in many cases by simply including the desired header since most components are header-only. A few components require linking to a run-time component so they will need to be compiled.
XTL is hosted on GitHub and is available at http://www.github.io/djmott/xtl Checkout the repo with git:
For the most part XTL is a 'header-only' library so compilation isn't necessary. None the less, it must be configured for use with the compiler and operating system with CMake. From within the top level directory:
The compilation step is not always necessary depending on the required components that will be used. The method used to compile the run-time code is platform, toolchain and CMake configuration specific. For Linux, Cygwin and MinGW make files just run make
.
Several configuration options are available during configuration with CMake. For most purposes the default configuration should work fine. Applications should add the include
folder to the search path. The configuration with CMake detects the compiler toolchain and target operating system then produces the primary include file. For most applications just including the project header will go a long way:
XTL uses the Google Test framework for unit tests and system test. From within the build directory:
The unit tests and system tests are contained in the same resulting binary at tests/unit_tests
. The coverage_tests
build target is only available for GCC:
This will produce the binary tests/coverage_tests
which is identical to the tests/unit_tests
binary but has additional instrumenting enabled for gcov.
Online documentation is available at https://djmott.github.io/xtl and Doxygen is used to generate offline documentation. The code is fairly well marked up for doxygen generation. After the project has been configured with CMake build with documentation with:
This will extract the source comments and generate nice documentation in the docs/html
folder. Also available is the wiki
Submit a ticket on GitHub if a bug is found. Effort will be made to fix it ASAP.
Contributions are appreciated. To contribute monitarilty, toss me some cash on Beerpay or Gratipay To contirube code, fork the project, add some code and submit a pull request. In general, contributions should:
XTL is copyright by David Mott and licensed under the Boost Version 1.0 license agreement. See LICENSE.md or http://www.boost.org/LICENSE_1_0.txt for license details.
Hey dude! Help me out for a couple of :beers:!
 