cpp_utils

A lightweight C++ utility module for multithreaded pipeline components and JSON handling. Includes a flexible StageBase class for real-time data processing and tools for loading, validating, and writing structured JSON files using RapidJSON.

https://github.com/henriktrom/cpp_utils

Science Score: 64.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
    Links to: zenodo.org
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

cpp json multithreading utils-library
Last synced: 6 months ago · JSON representation ·

Repository

A lightweight C++ utility module for multithreaded pipeline components and JSON handling. Includes a flexible StageBase class for real-time data processing and tools for loading, validating, and writing structured JSON files using RapidJSON.

Basic Info
  • Host: GitHub
  • Owner: HenrikTrom
  • License: cc0-1.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 14.6 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
cpp json multithreading utils-library
Created 9 months ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

Readme.md

🧰 cpp-utils

DOI

A lightweight C++ utility module for multithreaded pipeline components and JSON handling. Includes a flexible StageBase class for real-time data processing and tools for loading, validating, and writing structured JSON files using RapidJSON.

This module is part of my ROS/ROS2 real-time 3D tracker and its docker-implementation.

📑 Citation

If you use this software, please use the GitHub “Cite this repository” button at the top(-right) of this page.

🔧 Features

✅ JSON Tools (jsontools.h)

  • Load and validate JSON documents with optional schema support
  • Save structured JSON objects to disk
  • Automatically timestamp JSON metadata
  • Scan directories for JSON or config files

💻 Cli Tools (clitools.h)

  • Simple status bar

📷 OpenCV Tools (opencvtools.h)

  • Batch Video Iterator, iterate over a batch of videos frame-by-frame

🧵 StageBase Template

A generic, thread-safe, multi-stage processing base class for building C++ pipelines.
Features: - Threaded input/output FIFOs - Customizable ProcessFunction - Hooks for completion callbacks - Runtime-safe termination and thread joining

Note: The general layout of StageBase was developed as part of Cheng Minghao's PhD work.

Integration

Include this repo as a submodule or CMake interface library in larger projects, such as:

Dependencies

  • C++17
  • OpenCV 4.10.0
  • spdlog
  • RapidJSON (included or linked)
  • Standard C++ libraries (<mutex>, <thread>, <queue>, <chrono>, etc.)

Example Usage

Load and validate JSON

cpp cpp_utils::Document config; cpp_utils::load_json_with_schema("config.json", "schema.json", 8192, config); `

Use the pipeline base

cpp class MyStage : public cpp_utils::StageBase<MyInput, MyOutput> { bool ProcessFunction(MyInput& input, MyOutput& output) override { // process input -> output return true; } };

👥 Acknowledgments

  • JSON loading and schema support based on RapidJSON
  • Stage Base Template was initially designed in Cheng Minghao's PhD and adjusted for online-tracking.

Owner

  • Name: Henrik
  • Login: HenrikTrom
  • Kind: user
  • Company: Göttingen University

👋 Hi, I'm Henrik — PhD researcher with a focus on real-time 3D tracking and software development for human-robot interaction.

Citation (Citation.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "cpp-utils"
version: 1.0.0
doi: 10.5281/zenodo.15526573
date-released: 2025-05-27
license: CC0-1.0 
url: https://github.com/HenrikTrom/cpp_utils
repository-code: https://github.com/HenrikTrom/cpp_utils
abstract: "A lightweight C++ utility module for multithreaded pipeline components and JSON handling."
authors:
  - family-names: Trommer
    given-names: Henrik
    orcid: https://orcid.org/0009-0002-3110-0963
    affiliation: University of Göttingen
keywords:
  - multithreading
  - json handling
  - video-loading
  - cli tools
  - open source
  - research software

GitHub Events

Total
  • Public event: 1
  • Push event: 3
  • Create event: 2
Last Year
  • Public event: 1
  • Push event: 3
  • Create event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 5
  • Total Committers: 2
  • Avg Commits per committer: 2.5
  • Development Distribution Score (DDS): 0.4
Past Year
  • Commits: 5
  • Committers: 2
  • Avg Commits per committer: 2.5
  • Development Distribution Score (DDS): 0.4
Top Committers
Name Email Commits
Henrik t****l@g****m 3
Henrik Trommer h****r@p****e 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels