|
osmanip
Library with useful output stream tools like: color and style manipulators, progress bars and terminal graphics.
|
Template class used to create customized progress bars. More...
#include <progress_bar.hpp>
Public Member Functions | |
| ProgressBar () | |
| Construct a new ProgressBar <bar_type>::ProgressBar object. Default constructor which set to null values the main attributes. More... | |
| ProgressBar (const bar_type &min, const bar_type &max) | |
| Construct a new ProgressBar <bar_type>::ProgressBar object. Parametric constructor which set to null values the main attributes except max_ and min which will be initialized respectively with max and min. More... | |
| void | setMax (bar_type max) |
| Set the maximum value of the ProgressBar. More... | |
| void | setMin (bar_type min) |
| Set the minimum value of the ProgressBar. More... | |
| void | setStyle (const std::string &type, const std::string &style) |
| Set the type and style of the ProgressBar. Available: "indicator" ("%", "/100"), "loader" ("#", "■"), "spinner" ("/-\\|"). More... | |
| void | setStyle (const std::string &type, const std::string &style_p, const std::string &style_l) |
| Set the style of the complete ProgressBar. Available: "indicator" ("%", "/100"), "loader" ("#", "■"), "spinner" ("/-\\|") and "complete" with both indicator first and loader second. More... | |
| void | setMessage (std::string_view message) |
| Set the message of the ProgressBar. More... | |
| void | setBegin () |
| Set begin time count. More... | |
| void | setEnd () |
| Set end time count. More... | |
| void | setBrackets (std::string_view brackets_open, std::string_view brackets_close) |
| Set brackets of the ProgressBar. More... | |
| void | setColor (const std::string &color) |
| Set the color of the ProgressBar. More... | |
| void | setRemainingTimeFlag (std::string_view time_flag) |
| Set the remaining time of the ProgressBar. More... | |
| void | resetAll () |
| Reset the ProgressBar variables. More... | |
| void | resetMax () |
| Reset the ProgressBar Max variable. More... | |
| void | resetMin () |
| Reset the ProgressBar Min variable. More... | |
| void | resetStyle () |
| Reset the ProgressBar Style variable. More... | |
| void | resetMessage () |
| Reset the ProgressBar Message variable. More... | |
| void | resetTime () |
| Reset the ProgressBar time count. More... | |
| void | resetRemainingTime () |
| Reset the ProgressBar time remaining count. More... | |
| void | resetBrackets () |
| Reset the ProgressBar brackets. More... | |
| void | resetColor () |
| Reset the ProgressBar color. More... | |
| bar_type | getMax () const |
| Get the ProgressBar Max variable. More... | |
| bar_type | getMin () const |
| Get the ProgressBar Min variable. More... | |
| long long | getTime () const |
| Get the ProgressBar current time value. More... | |
| bar_type | getIteratingVar () const |
| Get the ProgressBar iterating variable value. More... | |
| std::string | getStyle () const |
| Get the ProgressBar Style variable. More... | |
| std::string | getStyleComplete () const |
| Get the ProgressBar Style variable for "complete" variable type. More... | |
| std::string | getType () const |
| Get the ProgressBar Type variable. More... | |
| std::string | getMessage () const |
| Get the ProgressBar Message variable. More... | |
| std::string | getBrackets_open () const |
| Get the ProgressBar brackets_open variable. More... | |
| std::string | getBrackets_close () const |
| Get the ProgressBar brackets_close variable. More... | |
| std::string | getColor () const |
| Get the ProgressBar color variable. More... | |
| std::string | getColorName () const |
| Get the ProgressBar color name variable. More... | |
| std::string | getRemainingTimeFlag () const |
| Get the ProgressBar time remaining variable. More... | |
| void | update (bar_type iterating_var) |
| Update the progress bar indicator. More... | |
| void | print () const |
| Prints on the screen the progress bar variable values. More... | |
| void | addStyle (const std::string &type, const std::string &style) |
| Add customized styles to the ProgressBar. More... | |
Template class used to create customized progress bars.
| bar_type | It is the type of the progress bar. |
|
inline |
Construct a new ProgressBar <bar_type>::ProgressBar object. Default constructor which set to null values the main attributes.
| bar_type | The type of the ProgressBar. |
|
inlineexplicit |
Construct a new ProgressBar <bar_type>::ProgressBar object. Parametric constructor which set to null values the main attributes except max_ and min which will be initialized respectively with max and min.
| bar_type | The type of the ProgressBar. |
| min | The minimum value of the ProgressBar. |
| max | The maximum value of the ProgressBar. |
|
inline |
Add customized styles to the ProgressBar.
| bar_type | The type of the ProgressBar. |
| type | The type of the ProgressBar. |
| style | The style of the ProgressBar. |
|
inline |
Get the ProgressBar brackets_close variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar brackets_open variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar color variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar color name variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar iterating variable value.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar Max variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar Message variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar Min variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar time remaining variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar Style variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar Style variable for "complete" variable type.
| bar_type | The style of the ProgressBar. |
|
inline |
Get the ProgressBar current time value.
| bar_type | The type of the ProgressBar. |
|
inline |
Get the ProgressBar Type variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Prints on the screen the progress bar variable values.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar variables.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar brackets.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar color.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar Max variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar Message variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar Min variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar time remaining count.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar Style variable.
| bar_type | The type of the ProgressBar. |
|
inline |
Reset the ProgressBar time count.
| bar_type | The type of the ProgressBar. |
|
inline |
Set begin time count.
| bar_type | The type of the ProgressBar. |
|
inline |
Set brackets of the ProgressBar.
| bar_type | The type of the ProgressBar. |
| brackets_open | Open bracket. |
| brackets_close | Close bracket. |
|
inline |
Set the color of the ProgressBar.
| bar_type | The type of the ProgressBar. |
| color | The color of the ProgressBar. |
|
inline |
Set end time count.
| bar_type | The type of the* ProgressBar. |
|
inline |
Set the maximum value of the ProgressBar.
| bar_type | The type of the ProgressBar. |
| max | The maximum value of the ProgressBar. |
|
inline |
Set the message of the ProgressBar.
| bar_type | The type of the ProgressBar. |
| message | The message of the ProgressBar. |
|
inline |
Set the minimum value of the ProgressBar.
| bar_type | The type of the ProgressBar. |
| min | The minimum value of the ProgressBar. |
|
inline |
Set the remaining time of the ProgressBar.
| bar_type | The type of the ProgressBar. |
| time_flag | The flag of the remaining time. |
|
inline |
Set the type and style of the ProgressBar. Available: "indicator" ("%", "/100"), "loader" ("#", "■"), "spinner" ("/-\\|").
| bar_type | The type of the ProgressBar. |
| type | The type (flavor) of the ProgressBar. |
| style | The style of the ProgressBar. Available: |
|
inline |
Set the style of the complete ProgressBar. Available: "indicator" ("%", "/100"), "loader" ("#", "■"), "spinner" ("/-\\|") and "complete" with both indicator first and loader second.
| bar_type | The type of the ProgressBar. |
| type | The type (flavor) of the ProgressBar. |
| style_p | The style of the percentage part of the progress bar. |
| style_l | The style of the bar part of the progress bar. |
|
inline |
Update the progress bar indicator.
| bar_type | The type of the ProgressBar. |
| value | The value of the progress bar indicator. |