Class astrea::utilities::ProgressBar¶
ClassList > astrea > utilities > ProgressBar
A simple console progress bar utility.
#include <ProgressBar.hpp>
Public Functions¶
| Type | Name |
|---|---|
| ProgressBar (const std::size_t & maxRecords, const std::string & title="Progress", const std::size_t & frequency=0, const std::size_t & barWidth=50) Constructs a ProgressBar instance. |
|
| std::size_t | get_progress () const Increments the progress by one record. |
| void | operator() () Updates the progress bar and prints it to the console. |
| void | reset () Resets the progress bar to the initial state. |
| ~ProgressBar () = default Default destructor for ProgressBar . |
Public Functions Documentation¶
function ProgressBar¶
Constructs a ProgressBar instance.
inline astrea::utilities::ProgressBar::ProgressBar (
const std::size_t & maxRecords,
const std::string & title="Progress",
const std::size_t & frequency=0,
const std::size_t & barWidth=50
)
Parameters:
maxRecordsThe maximum number of records to process.titleThe title of the progress bar.frequencyThe frequency of updates (in terms of records processed).barWidthThe width of the progress bar in characters.
function get_progress¶
Increments the progress by one record.
function operator()¶
Updates the progress bar and prints it to the console.
This method should be called periodically to update the progress bar.
function reset¶
Resets the progress bar to the initial state.
function ~ProgressBar¶
Default destructor for ProgressBar .
The documentation for this class was generated from the following file astrea/utilities/utilities/ProgressBar.hpp