All Projects → prakhar1989 → Progress Cpp

prakhar1989 / Progress Cpp

Licence: mit
A flexible ASCII progress-bar for C++

Labels

Projects that are alternatives of or similar to Progress Cpp

Nitroshare Desktop
Network file transfer application for Windows, OS X, & Linux
Stars: ✭ 1,150 (+1319.75%)
Mutual labels:  cmake
Fcnpc
FCNPC - Fully Controllable NPC
Stars: ✭ 73 (-9.88%)
Mutual labels:  cmake
Cotire
CMake module to speed up builds.
Stars: ✭ 1,212 (+1396.3%)
Mutual labels:  cmake
Didi challenge ros
Roslaunch to visualize a rosbag file from Udacity (DiDi Challenge)
Stars: ✭ 69 (-14.81%)
Mutual labels:  cmake
Burst
То, чего нет в Бусте
Stars: ✭ 72 (-11.11%)
Mutual labels:  cmake
Openssl Cmake
Build OpenSSL with CMake on MacOS, Win32, Win64 and cross compile for Android, IOS
Stars: ✭ 76 (-6.17%)
Mutual labels:  cmake
Spirit
Atomistic Spin Simulation Framework
Stars: ✭ 67 (-17.28%)
Mutual labels:  cmake
Gr Elster
A GNU Radio block that decodes packets transmitted by Elster R2S smart meters
Stars: ✭ 78 (-3.7%)
Mutual labels:  cmake
Gpu Icp Slam
Stars: ✭ 73 (-9.88%)
Mutual labels:  cmake
Findtbb
CMake find module for Intel Threading Building Blocks
Stars: ✭ 77 (-4.94%)
Mutual labels:  cmake
Magnum Bootstrap
Bootstrap projects for Magnum C++11/C++14 graphics engine
Stars: ✭ 69 (-14.81%)
Mutual labels:  cmake
Hacktoberfest2020
Contribute for hacktoberfest 2020
Stars: ✭ 72 (-11.11%)
Mutual labels:  cmake
Cmake.vim
🔨 CMake functionality within Vim.
Stars: ✭ 76 (-6.17%)
Mutual labels:  cmake
Tristeon3d
A 3D Engine built by two Game Engineering students.
Stars: ✭ 68 (-16.05%)
Mutual labels:  cmake
Hpp Skel
Skeleton for C++ header-only libraries
Stars: ✭ 78 (-3.7%)
Mutual labels:  cmake
Hazelcast Cpp Client
Hazelcast IMDG C++ Client
Stars: ✭ 67 (-17.28%)
Mutual labels:  cmake
Cmake Modules
CMake modules for some scientific libraries
Stars: ✭ 75 (-7.41%)
Mutual labels:  cmake
Llvm Amdgpu Assembler Extra
LLVM AMDGPU Assembler Helper Tools
Stars: ✭ 80 (-1.23%)
Mutual labels:  cmake
Leathers
🚀 Warning suppression library (C++)
Stars: ✭ 78 (-3.7%)
Mutual labels:  cmake
Helloworld
A C++ Hello World project, using CMake, and GitHub Actions
Stars: ✭ 77 (-4.94%)
Mutual labels:  cmake

Progress-CPP

A flexible ASCII progress bar for your console based C++ projects.

Usage

Progress is a header-only library and can be used by simply including the ProgressBar.hpp header file.

The bar takes the following options at initialization

  • Limit: the total number of ticks that need to be completed
  • Width: width of the bar
  • Complete Char: the character to indicate completion (defaults to =)
  • Incomplete Char: the character to indicate pending. (defaults to ' ')
#include "ProgressBar.hpp"

int main() {

    const int limit = 10000;

    // initialize the bar
    ProgressBar progressBar(limit, 70);

    for (int i = 0; i < limit; i++) {
        // record the tick
        ++progressBar;

        // display the bar
        progressBar.display();
    }

    // tell the bar to finish
    progressBar.done();
}

The above code results in the following output

[===================>                                                 ] 29% 0.821s

Example

Refer to example.cpp file for an example usage. To run it,

$ mkdir build && cd build
$ cmake ..
$ make
$ ./ProgressBar

Or without cmake

$ g++ -O3 -I. main.cpp -Wall -std=c++11 -o ProgressBar
$ ./ProgressBar

CMake configuration

Cmake and project layout is inspired by github.com/TheLartians/ModernCppStarter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].