#include <ProgressTracker.h>
Public Member Functions | |
| ProgressTracker () | |
| ProgressTracker (Progress *pProgress, const std::string &message, const std::string &component, const std::string &key) | |
| void | initialize (Progress *pProgress, const std::string &message, const std::string &component, const std::string &key) |
| void | initialize (const std::string &message, const std::string &component, const std::string &key) |
| void | subdivideCurrentStage (std::vector< Stage > &stages) |
| void | upALevel () |
| void | nextStage () |
| void | report (const std::string &text, int percent, ReportingLevel gran, bool log=false) |
| bool | getStatus (std::string &text, int &percent, ReportingLevel &level) |
| Progress * | getCurrentProgress () const |
| void | abort () |
| Step * | getCurrentStep () |
Classes | |
| class | Stage |
| This is a stage in a progress track. More... | |
Definition at line 58 of file ProgressTracker.h.
| ProgressTracker::ProgressTracker | ( | ) |
| ProgressTracker::ProgressTracker | ( | Progress * | pProgress, | |
| const std::string & | message, | |||
| const std::string & | component, | |||
| const std::string & | key | |||
| ) |
Construct a progress tracker with a Progress object and Step message.
This convenience constructor is equivalent to constructing an empty progress tracker then calling initialize().
| pProgress | The Progress object associated with this tracker. | |
| message | The message of the root Stage. | |
| component | The component associated with the root message log Step. | |
| key | The key associated with the root message log Step. |
Definition at line 209 of file ProgressTracker.h.
| void ProgressTracker::initialize | ( | Progress * | pProgress, | |
| const std::string & | message, | |||
| const std::string & | component, | |||
| const std::string & | key | |||
| ) |
Initialize a tracker.
| pProgress | The Progress object associated with this tracker. | |
| message | The message of the root Stage. | |
| component | The component associated with the root message log Step. | |
| key | The key associated with the root message log Step. |
| void ProgressTracker::initialize | ( | const std::string & | message, | |
| const std::string & | component, | |||
| const std::string & | key | |||
| ) |
Initialize a tracker using the existing Progress object.
| message | The message of the root Stage. | |
| component | The component associated with the root message log Step. | |
| key | The key associated with the root message log Step. |
Definition at line 245 of file ProgressTracker.h.
| void ProgressTracker::subdivideCurrentStage | ( | std::vector< Stage > & | stages | ) |
| void ProgressTracker::upALevel | ( | ) |
Finalize the current sub-stage and set the current stage to its parent.
| void ProgressTracker::nextStage | ( | ) |
Advance to the next sub-stage.
| void ProgressTracker::report | ( | const std::string & | text, | |
| int | percent, | |||
| ReportingLevel | gran, | |||
| bool | log = false | |||
| ) |
Report progress within a Stage.
| text | The text to send to the message log and Progress object. | |
| percent | The new percentage complete for the current Stage. | |
| gran | The ReportingLevel associated with this report. | |
| log | Should the message be sent to the message log as well as the Progress object? |
| bool ProgressTracker::getStatus | ( | std::string & | text, | |
| int & | percent, | |||
| ReportingLevel & | level | |||
| ) |
Get the current status as reported by the Progess object.
| text | Output argument which will hold the current Progress object text. | |
| percent | Output argument which will hold the current Progress object percent complete. | |
| level | Output argument which will hold the current state of the Progress object. |
Definition at line 299 of file ProgressTracker.h.
| Progress* ProgressTracker::getCurrentProgress | ( | ) | const |
Get the Progress object associated with the current step.
Definition at line 319 of file ProgressTracker.h.
| void ProgressTracker::abort | ( | ) |
Abort the process tracked by this ProgressTracker.
| Step* ProgressTracker::getCurrentStep | ( | ) |
Accessor for the message log Step associated with the current Stage.