Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lvr2::ProgressCounter Class Reference

A progress counter class. More...

#include <Progress.hpp>

Public Member Functions

void operator++ ()
 
 ProgressCounter (int stepVal, string prefix="")
 

Protected Member Functions

void print_progress ()
 Prints the current state. More...
 

Protected Attributes

size_t m_currentVal
 The current counter value. More...
 
string m_fillstring
 A fill string for correct output alignment. More...
 
boost::mutex m_mutex
 A mutex object for counter increment (for parallel executions) More...
 
string m_prefix
 The prefix string. More...
 
size_t m_stepVal
 The step value for output generation. More...
 
stringstream m_stream
 A string stream for output generation. More...
 

Detailed Description

A progress counter class.

This class can be used of the number of performed operations is not known in advance (e.g. ASCII file reading). After m_stepVal} operations the current counter is printed.

Definition at line 147 of file Progress.hpp.

Constructor & Destructor Documentation

◆ ProgressCounter()

lvr2::ProgressCounter::ProgressCounter ( int  stepVal,
string  prefix = "" 
)

Definition at line 138 of file Progress.cpp.

Member Function Documentation

◆ operator++()

void lvr2::ProgressCounter::operator++ ( )

Definition at line 145 of file Progress.cpp.

◆ print_progress()

void lvr2::ProgressCounter::print_progress ( )
protected

Prints the current state.

Definition at line 155 of file Progress.cpp.

Member Data Documentation

◆ m_currentVal

size_t lvr2::ProgressCounter::m_currentVal
protected

The current counter value.

Definition at line 176 of file Progress.hpp.

◆ m_fillstring

string lvr2::ProgressCounter::m_fillstring
protected

A fill string for correct output alignment.

Definition at line 185 of file Progress.hpp.

◆ m_mutex

boost::mutex lvr2::ProgressCounter::m_mutex
protected

A mutex object for counter increment (for parallel executions)

Definition at line 179 of file Progress.hpp.

◆ m_prefix

string lvr2::ProgressCounter::m_prefix
protected

The prefix string.

Definition at line 170 of file Progress.hpp.

◆ m_stepVal

size_t lvr2::ProgressCounter::m_stepVal
protected

The step value for output generation.

Definition at line 173 of file Progress.hpp.

◆ m_stream

stringstream lvr2::ProgressCounter::m_stream
protected

A string stream for output generation.

Definition at line 182 of file Progress.hpp.


The documentation for this class was generated from the following files:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:12