BioDynaMo  v1.03.58-27764645
Public Member Functions | Private Attributes | List of all members
bdm::ProgressBar Class Reference

#include <progress_bar.h>

Public Member Functions

 ProgressBar ()
 
 ProgressBar (int total_steps)
 
void Step (uint64_t steps=1)
 Inceases the counter executed_steps_ by steps. More...
 
void PrintProgressBar (std::ostream &out=std::cout)
 Prints the progress bar. More...
 

Private Attributes

uint64_t total_steps_
 Total number of steps to be executed. More...
 
uint64_t executed_steps_
 Number of steps that have already been executed. More...
 
int64_t start_time_
 Timestamp when to when the progress bar was initialized. More...
 
bool first_iter_
 
int n_digits_time_
 
bool write_to_file_
 

Detailed Description

Definition at line 23 of file progress_bar.h.

Constructor & Destructor Documentation

◆ ProgressBar() [1/2]

bdm::ProgressBar::ProgressBar ( )

Definition at line 24 of file progress_bar.cc.

◆ ProgressBar() [2/2]

bdm::ProgressBar::ProgressBar ( int  total_steps)

Definition at line 26 of file progress_bar.cc.

Member Function Documentation

◆ PrintProgressBar()

void bdm::ProgressBar::PrintProgressBar ( std::ostream &  out = std::cout)

Prints the progress bar.

Definition at line 36 of file progress_bar.cc.

◆ Step()

void bdm::ProgressBar::Step ( uint64_t  steps = 1)

Inceases the counter executed_steps_ by steps.

Definition at line 34 of file progress_bar.cc.

Member Data Documentation

◆ executed_steps_

uint64_t bdm::ProgressBar::executed_steps_
private

Number of steps that have already been executed.

Definition at line 28 of file progress_bar.h.

◆ first_iter_

bool bdm::ProgressBar::first_iter_
private

Boolean variable to print certain informatoin only once in the first iteration.

Definition at line 33 of file progress_bar.h.

◆ n_digits_time_

int bdm::ProgressBar::n_digits_time_
private

Keep track of space that is needed for printing elapsed and remaining time for nicer output.

Definition at line 36 of file progress_bar.h.

◆ start_time_

int64_t bdm::ProgressBar::start_time_
private

Timestamp when to when the progress bar was initialized.

Definition at line 30 of file progress_bar.h.

◆ total_steps_

uint64_t bdm::ProgressBar::total_steps_
private

Total number of steps to be executed.

Definition at line 26 of file progress_bar.h.

◆ write_to_file_

bool bdm::ProgressBar::write_to_file_
private

Variable to detect if we write to a file or not. ProgressBar is not visible if we write to file.

Definition at line 39 of file progress_bar.h.


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