#include <progressive.hpp>
Inherit form this class to give your class create_progress(), update_progress(), and destroy_progress() methods, and a public show_progress field that can be toggled on and off.
Must not be destroyed while a progress bar is active.
◆ create_progress() [1/2]
void vg::Progressive::create_progress |
( |
const string & |
message, |
|
|
long |
count |
|
) |
| |
Create a progress bar showing the given message, with the given number of items to process. Does nothing if show_progress is false. Replaces any existing progress bar.
◆ create_progress() [2/2]
void vg::Progressive::create_progress |
( |
long |
count | ) |
|
Create a progress bar with the given number of items to process, using either a default message, or the message passed to the last preload_progress call since a progress bar was destroyed. Does nothing if show_progress is false. Replaces any existing progress bar.
◆ destroy_progress()
void vg::Progressive::destroy_progress |
( |
void |
| ) |
|
Destroy the current progress bar, if it exists.
◆ increment_progress()
void vg::Progressive::increment_progress |
( |
| ) |
|
Update the progress bar, noting that one additional item has been processed. Does nothing if no progress bar is displayed.
◆ preload_progress()
void vg::Progressive::preload_progress |
( |
const string & |
message | ) |
|
If no progress bar is currently displayed, set the message to use for the next progress bar to be created. Does nothing if show_progress is false or when a progress bar is displayed.
Public so that users of a class can provide descriptive messages for generic progress operations (like VG's for_each_kmer_parallel).
◆ update_progress()
void vg::Progressive::update_progress |
( |
long |
i | ) |
|
Update the progress bar, noting that the given number of items have been processed. Does nothing if no progress bar is displayed.
◆ last_progress
long vg::Progressive::last_progress |
|
private |
◆ progress
ProgressBar* vg::Progressive::progress = nullptr |
|
private |
◆ progress_count
long vg::Progressive::progress_count |
|
private |
◆ progress_message
string vg::Progressive::progress_message = "progress" |
|
private |
◆ progress_seen
long vg::Progressive::progress_seen |
|
private |
◆ show_progress
bool vg::Progressive::show_progress = false |
The documentation for this class was generated from the following files: