Progress object that does nothing. More...
#include <mbl_progress_null.h>
Public Member Functions | |
mbl_progress_null () | |
Constructor. | |
~mbl_progress_null () | |
Destructor. | |
virtual vcl_string | is_a () const |
Name of the class. | |
void | set_estimated_iterations (const vcl_string &identifier, const int iterations, const vcl_string &display_text) |
Estimated number of iterations for the given identifier. | |
void | set_throw_exception_on_cancel (bool t) |
If true set_progress() will throw an exception if cancel has been set. | |
void | set_progress (const vcl_string &identifier, const int progress) |
Sets progress for the given identifier. | |
void | increment_progress (const vcl_string &identifier, const int n=1) |
Increments progress for the given identifier by n. | |
void | end_progress (const vcl_string &identifier) |
Explicitly marks the end of loop for the given identifier. | |
int | progress (const vcl_string &identifier) const |
Gets progress for given identifier. | |
vcl_string | display_text (const vcl_string &identifier) const |
Gets display text for given identifier. | |
int | estimated_iterations (const vcl_string &identifier) const |
Gets estimated total iterations for given identifier. | |
void | set_cancelled (const vcl_string &identifier, const bool cancel) |
Modify the flag to cancel the current process. | |
bool | is_cancelled (const vcl_string &identifier) const |
Check whether progress object is marked as cancelled. | |
Protected Member Functions | |
virtual void | on_set_estimated_iterations (const vcl_string &identifier, const int total_iterations) |
Called when set_estimated_iterations() is called for a given identifier. | |
virtual void | on_set_progress (const vcl_string &identifier, const int progress) |
Called when set_progress() is called for a given identifier. | |
virtual void | on_end_progress (const vcl_string &identifier) |
Called when end_progress() is called for a given identifier. |
Progress object that does nothing.
Definition at line 16 of file mbl_progress_null.h.
mbl_progress_null::mbl_progress_null | ( | ) |
Constructor.
Definition at line 13 of file mbl_progress_null.cxx.
mbl_progress_null::~mbl_progress_null | ( | ) |
Destructor.
Definition at line 17 of file mbl_progress_null.cxx.
vcl_string mbl_progress::display_text | ( | const vcl_string & | identifier | ) | const [inherited] |
Gets display text for given identifier.
identifier | to query. |
Definition at line 83 of file mbl_progress.cxx.
void mbl_progress::end_progress | ( | const vcl_string & | identifier | ) | [inherited] |
Explicitly marks the end of loop for the given identifier.
Definition at line 62 of file mbl_progress.cxx.
int mbl_progress::estimated_iterations | ( | const vcl_string & | identifier | ) | const [inherited] |
Gets estimated total iterations for given identifier.
identifier | to query. |
Definition at line 97 of file mbl_progress.cxx.
void mbl_progress::increment_progress | ( | const vcl_string & | identifier, |
const int | n = 1 |
||
) | [inherited] |
Increments progress for the given identifier by n.
Definition at line 48 of file mbl_progress.cxx.
vcl_string mbl_progress_null::is_a | ( | ) | const [virtual] |
Name of the class.
Definition at line 21 of file mbl_progress_null.cxx.
bool mbl_progress::is_cancelled | ( | const vcl_string & | identifier | ) | const [inherited] |
Check whether progress object is marked as cancelled.
identifier | Progress object to check. |
Definition at line 130 of file mbl_progress.cxx.
void mbl_progress_null::on_end_progress | ( | const vcl_string & | identifier | ) | [protected, virtual] |
Called when end_progress() is called for a given identifier.
Derived classes may take some action here.
identifier | The operation being monitored. |
Implements mbl_progress.
Definition at line 35 of file mbl_progress_null.cxx.
void mbl_progress_null::on_set_estimated_iterations | ( | const vcl_string & | identifier, |
const int | total_iterations | ||
) | [protected, virtual] |
Called when set_estimated_iterations() is called for a given identifier.
Derived classes may take some action here.
identifier | The operation being monitored. |
Implements mbl_progress.
Definition at line 25 of file mbl_progress_null.cxx.
void mbl_progress_null::on_set_progress | ( | const vcl_string & | identifier, |
const int | progress | ||
) | [protected, virtual] |
Called when set_progress() is called for a given identifier.
Derived classes may take some action here.
identifier | The operation being monitored. |
progress | The new progress status. |
Implements mbl_progress.
Definition at line 30 of file mbl_progress_null.cxx.
int mbl_progress::progress | ( | const vcl_string & | identifier | ) | const [inherited] |
Gets progress for given identifier.
identifier | to query. |
Definition at line 69 of file mbl_progress.cxx.
void mbl_progress::set_cancelled | ( | const vcl_string & | identifier, |
const bool | cancel | ||
) | [inherited] |
Modify the flag to cancel the current process.
identifier | Progress object to cancel. |
Definition at line 114 of file mbl_progress.cxx.
void mbl_progress::set_estimated_iterations | ( | const vcl_string & | identifier, |
const int | iterations, | ||
const vcl_string & | display_text | ||
) | [inherited] |
Estimated number of iterations for the given identifier.
Definition at line 11 of file mbl_progress.cxx.
void mbl_progress::set_progress | ( | const vcl_string & | identifier, |
const int | progress | ||
) | [inherited] |
Sets progress for the given identifier.
Checks whether cancel has been set; if so calls end_progress(), and throws an exception if "throw_exception_on_cancel" is true.
Definition at line 24 of file mbl_progress.cxx.
void mbl_progress::set_throw_exception_on_cancel | ( | bool | t | ) | [inline, inherited] |
If true set_progress() will throw an exception if cancel has been set.
Definition at line 64 of file mbl_progress.h.