arsenalgear-cpp
A library containing general purpose C++ utils.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Keywords
Repository
A library containing general purpose C++ utils.
Basic Info
Statistics
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 10
Topics
Metadata Files
README.md
A library containing general purpose C++ utils
Table of contents
- Introduction
- Architectures support
- Install and use
- Tests
- List of features
- List of known projects which use this library
- Credits
- Project leaders
- [Other Contributors(#other-contributors)
- Stargazers over time
Introduction
This is a C++17/20 library containing a set of generic utils I developed for other projects. There are several sub-headers / modules related to the various topics (math, iostream and others). Existing tools are constantly updated and new ones are added once their development is required for other projects. Some projects in which I am using this library are, for example: osmanip and SAFD-algorithm.
This library is fully type-safe with automatic memory management, with minimal and indispensable dependencies.
It can be installed from source or via vcpkg. See this section for further details.
If you want to use this library please cite it following this citation template.
If you want to contribute to the repository, see this document before.
If you plan to use this library please tell me so I can add your project to the list of known projects which use this library
Code documentation is generated using Doxygen and can be accessed here.
The software is and will stay free, but if you want to support me with a donation it would be really appreciated!
Architectures support
Operating systems
- Linux
- Ubuntu (tested)
- Windows
- Cygwin64 (tested)
- MSYS2 (tested)
- MinGW (tested)
- WSL (tested)
- MacOS
Compilers
- gcc:
- C++17: 7/8/9/10/11/12
- C++20: 10/11/12
- clang:
- C++17: 5/6/7/8/9/10/11/12/13/14/15
- C++20: 9/10/11/12/13/14/15
- MSVC:
- C++17: 19 (only this one tested)
- C++20: //
Install and use
Install
Steps to be reproduced:
1) Download one of the releases of the repository.
2) Unzip and enter the downloaded repository directory.
3) Install into the system with these command:
Set the building directory:
bash
cmake -B build
Install:
bash
sudo cmake --build build --target install
:warning:
sudois not required on Windows.
Prerequisites are minimal:
- g++ (like gcc, clang or MSVC) compiler.
- C++17 standard at least.
- CMake (v 3.15 at least).
Use in your device
Once you have installed the library you can freely use it in one of your C++ projects by including one or more of the modules:
```c++
include
```
To compile it you have simply add the -larsenalgear compilation flag.
NOTE: if you are on Windows and didn't install the headers and libraries in a system standard path you probably need to add also the
-I\path\to\includeand-L\path\to\libflags.
Use with CMake
To get an installed version of the library:
cmake
find_package( arsenalgear )
then, to link it to a target:
cmake
target_link_libraries( ${TARGET} arsenalgear::arsenalgear )
To avoid tests compilation:
cmake
set( ARSENALGEAR_TESTS OFF )
Package managers
This is the list of available package managers for arsenalgear:
Tests
Tests are produced using -Wall -Wextra -pedantic flags. To check them you need some prerequisites:
Before running test codes you need to compile them:
txt
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
To launch all tests simultaneously:
txt
./test/all_tests.sh
EXTRA: to check that only the needed headers are include use this script:
txt
./test/IWYU.sh
List of features
Constants
null_string: template variable to define the null string.empty_space: template variable to define the empty space.
Math
roundoff: function use to round the value a floating point variable.IsInBounds: functions used to check if a variable lies in a range.parsed_f: functions used to parse a mathematical function.
Operators
Operator *(intand string-like object) to multiply a string by an integer (and vice-versa), in the sense that the string is repeated n-times.
Stream
null_stream: definition of the null stream.savebuf: class used to store the output of an output stream (useful for testing).select_cout: struct used to define an object which can be a differentstd::coutobjects based on itschartype.select_cin: struct used to define an object which can be a differentstd::cinobjects based on itschartype.
System
getCommandOut: function used to print the output of a command in the console.
Utils
multi: function used to multiply a string for n times.split_string: function used to split a string based on a certain reges.except_error_func: function used to throw customized exception error.isFloatingPoint: function used to check if an expression is a floating point or not.one: function used to find the incremented unit of a loop.StringConverter: function used to convert acharstring into other char types (wchar_t,char16_t, etc...).is_escape: function used to check if a string contain an ANSI escape sequence or not.
Containers
extract_map_elem: function used to extract a vector of elements from a map.extract_map_keys: function used to extract a vector of keys from a map.
Type
is_pointer_to_const_char: function used to check if a string is a pointer to const char.is_str: function used to check if a string is anstd::stringobject.is_streamable: struct used to check if a type is streamable to a stream or not.is_any: function used to check if a type is in a list or not. Very useful to perform this operation with parameter packs.
List of known projects which use this library
Credits
Project leaders
Gianluca Bianco |
Other Contributors
oz_10 |
SpaceIm |
Stargazers over time
Owner
- Name: Gianluca Bianco
- Login: JustWhit3
- Kind: user
- Location: Bologna, Italy
- Company: University of Bologna and INFN
- Website: https://justwhit3.github.io/
- Twitter: JustWhit33
- Repositories: 14
- Profile: https://github.com/JustWhit3
PhD student in particle physics at the University of Bologna and member of the CERN ATLAS experiment. Passionate about coding (C++ in particular)
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Gianluca" given-names: "Bianco" title: "osmanip" version: 2.1.0 doi: https://zenodo.org/badge/latestdoi/501553690 date-released: 2022-06-09 url: "https://github.com/JustWhit3/arsenalgear-cpp"
GitHub Events
Total
Last Year
Dependencies
- EndBug/add-and-commit v7 composite
- actions/checkout v2 composite
- actions/download-artifact v2 composite
- actions/upload-artifact v2 composite
- mattnotmitt/doxygen-action v1.3.1 composite
- actions/checkout v2 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v2 composite
- ghcr.io/rikorose/gcc-cmake gcc-8
- ghcr.io/rikorose/gcc-cmake gcc-9
- ghcr.io/rikorose/gcc-cmake gcc-10
- ghcr.io/rikorose/gcc-cmake gcc-11
- ghcr.io/rikorose/gcc-cmake gcc-12
- silkeh/clang 5
- silkeh/clang 6
- silkeh/clang 7
- silkeh/clang 8
- silkeh/clang 9
- silkeh/clang 10
- silkeh/clang 11
- silkeh/clang 12
- silkeh/clang 13
- silkeh/clang 14