The OffcenterCommon project is a set of C++ libraries of support classes and routines for other offcenter applications and libraries.
This project is hosted on github under user CodeRancher.
To clone this repository use the git command:
git clone https://github.com/CodeRancher/OffcenterCommon.gitThe most simple build, if dependencies are installed globally.
cd OffcenterCommon
mkdir build
cd build
cmake ..
makeA more complicated build if the libraries are in non-standard locations.
cd OffcenterCommon
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=<installation path> \
-DBUILD_DOC=<ON|OFF> \
-DCMAKE_PREFIX_PATH="<nlohmann json path>;<cpprestsdk path>" \
-DBOOST_ROOT=<boost root> \
-DEASYLOGGINGPP_ROOT=<easyloggingpp root> \
-DEASYLOGGINGPP_USE_STATIC_LIBS=<ON|OFF> \
-DAPR_ALTLOCATION=<alt location for apr> \
-DGTEST_ROOT=<googletest root> \
..
make installImportant make commands.
| Command | Action |
|---|---|
| make | Build library. Build documentation if ${BUILD_DOC}=ON |
| make install | Build library and install to ${CMAKE_INSTALL_PREFIX}. Build documentation if ${BUILD_DOC}=ON |
| make doc_doxygen | Build library. Build documentation if ${BUILD_DOC}=ON |
Important cmake build variables.
| Variable | Description | Examples |
|---|---|---|
| CMAKE_INSTALL_PREFIX | Install directory for make install. |
e.g. ${HOME}/libs |
| CMAKE_PREFIX_PATH | Directories to search during make. |
${HOME}/libs/cmake/nlohmann_json;${HOME}/libs/cmake/cpprestsdk |
| BUILD_DOC | Build Doxygen documentation during make doc_doxygen. Can be 'ON' or 'OFF'. |
ON |
| BOOST_ROOT | Boost library location. | e.g. ${HOME}/libs |
| EASYLOGGINGPP_ROOT | Easylogging++ library location. | e.g. ${HOME}/libs |
| EASYLOGGINGPP_USE_STATIC_LIBS | If ${EASYLOGGINGPP_USE_STATIC_LIBS} is ON then static libs are searched. | ON |
| APR_ALTLOCATION | Alternate location to search for libraries/executables | e.g. ${HOME}/libs |
| GTEST_ROOT | The root directory of the Google Test installation. | e.g. ${HOME}/libs |
| Library | Minimum Version | License |
|---|---|---|
| nlohmann json | 3.9.1 | MIT |
| C++ REST SDK | 2.10.16 | MIT |
| Boost | 1.74 | Boost Software License 1.0 |
| Easylogging++ | 9.97.0 | MIT |
| SOCI | v4.0.1 | GNU LGPL version 2.1 |
| GoogleTest | 1.10.0 | BSD 3-Clause "New" or "Revised" License (modified) |
| OpenSSL | 1.1.1 |
| Tools |
|---|
| Doxygen |
Simplifies connecting to and using an ActiveMQ server. This is a framework to create producers and consumers, automatically receive messages, and simplify configuration of connections to the server.
Simplified application framework that will create a connection to the ActiveMQ server, accept configuration options from the command line or file, and process messages. The general idea is to create a class inherited from IAmqpServerApp, then override several methods where processing of messages can occur.
Common classes used across other libraries.
Not implemented
This will be a management system for microservices. It will allow remote nodes to be started, stopped, paused, and resumed.
A group of frameworks that simplifies creation of applications. Integrates handling of command line options and config files.
Pending Development: Remote logging and monitoring of applications.
Support for simplifying command line options and config files within applications. Used extensively in the framework.
Simplifies creating a REST server. Has pregenerated command line/config file options for initializing the server.
Not implemented
This library will support creation of recurring tasks at intervals. This will be used with heartbeats between different microservices nodes.
Support for creating SOCI connections to databases.
Support for application threads, thread pools, and manipulating threads.
Missing Functionality
Add missing functionality.
Testing
The library needs testing from end-to-end. There are basic tests and examples for some of the most used calls but the rest of the system needs validation.
Documentation
- Create the missing documenation.
- Add examples.