2#ifndef STORMM_PROGRESSBAR_H
3#define STORMM_PROGRESSBAR_H
16 ProgressBar(
int cycle_count_in = 0,
bool show_bar_in =
true,
17 std::ostream &output_in = std::cout);
27 void initialize(
int n = 0,
bool show_bar_in =
true, std::ostream &out = std::cout);
99 std::string finished_mark;
100 std::string todo_mark;
101 std::string prgb_open_bracket;
102 std::string prgb_close_bracket;
103 std::ostream* output;
105 std::string bar_contents;
113 void updateTerminalWidth();
void setDoneChar(const std::string &sym)
Set a new "done" char for a ProgressBar object. This is the char that appears when a percentage is do...
Definition progress_bar.cpp:64
void initialize(int n=0, bool show_bar_in=true, std::ostream &out=std::cout)
Initializes a new Progress Bar from scratch, taking in user-specified information....
Definition progress_bar.cpp:34
void setOutputStream(std::ostream &stream)
Function to set the output stream of the current ProgressBar object. Default is cout,...
Definition progress_bar.cpp:89
void update()
Function to update the ProgressBar, incrementing the number of iterations by 1, calculating the appro...
Definition progress_bar.cpp:139
void setIterations(int iter)
Set a new number of iterations for an existing ProgressBar object.
Definition progress_bar.cpp:56
void showBar(bool flag=true)
Toggles the visibility of the ProgressBar. Default is true.
Definition progress_bar.cpp:84
void allocateBarContents()
Function to allocate the bar_contents string for the ProgressBar object. This is called when the bar ...
Definition progress_bar.cpp:104
void setClosingBracketChar(const std::string &sym)
Set a new closing bracket for a ProgressBar object. This is the char to use for a closing char of the...
Definition progress_bar.cpp:79
void reset()
Resets the current instance of the ProgressBar object (sets percentage to 0). To be used before a new...
Definition progress_bar.cpp:49
void setOpeningBracketChar(const std::string &sym)
Set a new opening bracket for a ProgressBar object. This is the char during the start of a ProgressBa...
Definition progress_bar.cpp:74
void setTodoChar(const std::string &sym)
Set a new "todo" char for a ProgressBar object. This is the char that populates the remaining of the ...
Definition progress_bar.cpp:69
void setTerminalWidth(int width)
Allows the user to set a custom terminal width for the ProgressBar. If this function is called,...
Definition progress_bar.cpp:94
const std::string & getState() const
Get the current state of the progress bar, for inspection.
Definition progress_bar.cpp:29
ProgressBar(int cycle_count_in=0, bool show_bar_in=true, std::ostream &output_in=std::cout)
The constructor for a ProgressBar.
Definition progress_bar.cpp:14