GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kost13/cpp-utils: Set of cpp utility classes.

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
examples
examples
 
 
include/cpputils
include/cpputils
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

CppUtils [work in progress]

GitHub Actions

Logger

Thread-safe logging tool. It provides stream interface.

cpputils::log::info() << "File loaded in " << time << " ms";
// 2020-03-16 20:00:00: [    info] File loaded in 420 ms

It allows adding timestamp, logging category, hiding debug logs, exporting log to file. User can construct Logger object or use static object defined in logger.cc and hidden from the user.

cpputils::Logger logger;
logger.warning() << "local logger";
cpputils::log::debug() << "whatever";

Logger supports std::vector

std::vector<int> v = {1,2,3};
cpputils::log::info() << v;
// 2020-03-12 15:15:12: [    info] [1, 2, 3]

Worker

Worker class allow executing functions in separate thread.

Worker worker;
worker.start() // starts worker thread
worker.async([]{ /* do some stuff */  }); // run lambda in worker's thread
worker.async([]{ /* do some stuff */  }); // function is added to the tasks queue
worker.priorityAsync([]{ /* do some stuff */  }); // function is added to the front
                                                     of the tasks queue
worker.async(std::bind(&Foo::method, foo_object, args...); // async call with std:bind

GuardedThread

sd::thread that in destructor calls joint() if it's jointable.

About

Set of cpp utility classes.

Topics

cpputilities

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.