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

#include <Progress.hpp>

Public Member Functions

void operator++ ()
 Increases the counter of performed iterations. More...
 
 PacmanProgressBar (size_t max_val, string prefix="", size_t bar_length=60)
 Ctor. More...
 
virtual ~PacmanProgressBar ()
 

Static Public Member Functions

static void setProgressCallback (ProgressCallbackPtr)
 Registers a callback that is called with the new value when the percentage of the progress changed. More...
 
static void setProgressTitleCallback (ProgressTitleCallbackPtr)
 Registers a callback that is called when a new progress instance is created. More...
 

Protected Member Functions

void print_bar ()
 Prints the output. More...
 

Protected Attributes

int m_bar_length
 
size_t m_currentVal
 The current counter. More...
 
string m_fillstring
 A fill string for correct output alignment. More...
 
size_t m_maxVal
 The number of iterations. More...
 
boost::mutex m_mutex
 A mutex object for counter increment (for parallel executions) More...
 
int m_percent
 The current progress in percent. More...
 
string m_prefix
 The prefix string. More...
 
stringstream m_stream
 A string stream for output generation. More...
 

Static Protected Attributes

static PacmanProgressCallbackPtr m_progressCallback = 0
 
static PacmanProgressTitleCallbackPtr m_titleCallback = 0
 

Detailed Description

Definition at line 202 of file Progress.hpp.

Constructor & Destructor Documentation

◆ PacmanProgressBar()

lvr2::PacmanProgressBar::PacmanProgressBar ( size_t  max_val,
string  prefix = "",
size_t  bar_length = 60 
)

Ctor.

Parameters
max_valThe number of performed iterations
prefixThe prefix string for progress output

Definition at line 163 of file Progress.cpp.

◆ ~PacmanProgressBar()

lvr2::PacmanProgressBar::~PacmanProgressBar ( )
virtual

Definition at line 181 of file Progress.cpp.

Member Function Documentation

◆ operator++()

void lvr2::PacmanProgressBar::operator++ ( )

Increases the counter of performed iterations.

Definition at line 196 of file Progress.cpp.

◆ print_bar()

void lvr2::PacmanProgressBar::print_bar ( )
protected

Prints the output.

Definition at line 222 of file Progress.cpp.

◆ setProgressCallback()

void lvr2::PacmanProgressBar::setProgressCallback ( ProgressCallbackPtr  ptr)
static

Registers a callback that is called with the new value when the percentage of the progress changed.

Parameters

Definition at line 186 of file Progress.cpp.

◆ setProgressTitleCallback()

void lvr2::PacmanProgressBar::setProgressTitleCallback ( ProgressTitleCallbackPtr  ptr)
static

Registers a callback that is called when a new progress instance is created.

Parameters

Definition at line 191 of file Progress.cpp.

Member Data Documentation

◆ m_bar_length

int lvr2::PacmanProgressBar::m_bar_length
protected

Definition at line 258 of file Progress.hpp.

◆ m_currentVal

size_t lvr2::PacmanProgressBar::m_currentVal
protected

The current counter.

Definition at line 249 of file Progress.hpp.

◆ m_fillstring

string lvr2::PacmanProgressBar::m_fillstring
protected

A fill string for correct output alignment.

Definition at line 264 of file Progress.hpp.

◆ m_maxVal

size_t lvr2::PacmanProgressBar::m_maxVal
protected

The number of iterations.

Definition at line 246 of file Progress.hpp.

◆ m_mutex

boost::mutex lvr2::PacmanProgressBar::m_mutex
protected

A mutex object for counter increment (for parallel executions)

Definition at line 252 of file Progress.hpp.

◆ m_percent

int lvr2::PacmanProgressBar::m_percent
protected

The current progress in percent.

Definition at line 255 of file Progress.hpp.

◆ m_prefix

string lvr2::PacmanProgressBar::m_prefix
protected

The prefix string.

Definition at line 243 of file Progress.hpp.

◆ m_progressCallback

PacmanProgressCallbackPtr lvr2::PacmanProgressBar::m_progressCallback = 0
staticprotected

Definition at line 266 of file Progress.hpp.

◆ m_stream

stringstream lvr2::PacmanProgressBar::m_stream
protected

A string stream for output generation.

Definition at line 261 of file Progress.hpp.

◆ m_titleCallback

PacmanProgressTitleCallbackPtr lvr2::PacmanProgressBar::m_titleCallback = 0
staticprotected

Definition at line 267 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 Wed Mar 2 2022 00:37:27