|
| ProgressBar (Out &out_r, NoStartBar, std::string progressId_r, const std::string &label_r, unsigned current_r=0, unsigned total_r=0) |
| Ctor not displaying an initial progress bar. More...
|
|
| ProgressBar (Out &out_r, NoStartBar, const std::string &label_r, unsigned current_r=0, unsigned total_r=0) |
|
| ProgressBar (Out &out_r, const std::string &progressId_r, const std::string &label_r, unsigned current_r=0, unsigned total_r=0) |
| Ctor displays initial progress bar. More...
|
|
| ProgressBar (Out &out_r, const std::string &label_r, unsigned current_r=0, unsigned total_r=0) |
|
| ~ProgressBar () |
| Dtor displays final progress bar. More...
|
|
void | print () |
| Immediately print the progress bar not waiting for a new trigger. More...
|
|
void | print (const std::string &label_r) |
|
void | error (ProgressEnd donetag_r=ProgressEnd::error) |
| Explicitly indicate the error condition for the final progress bar. More...
|
|
void | error (bool error_r) |
|
void | errorreset () |
| Reset any error condition. More...
|
|
void | error (const std::string &label_r) |
|
void | error (const char *label_r) |
|
|
zypp::ProgressData * | operator-> () |
|
const zypp::ProgressData * | operator-> () const |
|
zypp::ProgressData & | operator* () |
|
const zypp::ProgressData & | operator* () const |
|
Convenience class for progress output.
Progress start and end messages are provided upon object construction and deletion. Progress data are sent through a ProgressData object accessible via operator->.
{
Out::ProgressBar report( _zypper.out(), "Prepare action" );
for ( unsigned i = 0; i < 10; ++ i )
{
report->tick();
sleep(1);
}
report->range( 10 );
report.print( "Running action" );
for ( unsigned i = 0; i < 10; ++ i )
{
report->
report->set( i );
sleep(1);
}
}
If non zero values for current_r or total_r are passed to the ctor, the label is prefixed by either "(#C)" or "(#C/#T)"
- Todo:
- ProgressData provides NumericId which might be used as id for_out.progress*().
Definition at line 982 of file Out.h.