#include <ProgressData.h>
Public Member Functions | |
| CombinedProgressData (ProgressData &pd, ProgressData::value_type weight=0) | |
| bool | operator() (const ProgressData &progress) |
| Implements the ProgressData::ReceiverFnc callback interface. | |
Private Attributes | |
| ProgressData::value_type | _weight |
| ProgressData::value_type | _last_value |
| ProgressData & | _pd |
Example:
// receiver for main task void task_receiver( ProgressData &progress ); // subtask prototypes void do_subtask_one( ProgressData::ReceiverFnc &fnc ); void do_subtask_two( ProgressData::ReceiverFnc &fnc ); // main task ProgressData progress; //progress for subtask 1 // which is 80% CombinedProgressData sub1(pd, 80); // the second is only 20% CombinedProgressData sub2(pd, 20); do_subtask_one( sub1 ); do_subtask_two( sub2 );
Definition at line 387 of file ProgressData.h.
| zypp::CombinedProgressData::CombinedProgressData | ( | ProgressData & | pd, | |
| ProgressData::value_type | weight = 0 | |||
| ) |
Ctor Creates a ProgressData::ReceiverFnc from a ProgressData object
| pd | ProgressData object | |
| weight | Weight of the subtask relative to the main task range. |
| pd | only reports keepalives. then only ticks are sent. |
Definition at line 134 of file ProgressData.cc.
| bool zypp::CombinedProgressData::operator() | ( | const ProgressData & | progress | ) |
Implements the ProgressData::ReceiverFnc callback interface.
Definition at line 143 of file ProgressData.cc.
References _last_value, _pd, _weight, zypp::ProgressData::incr(), zypp::ProgressData::max(), zypp::ProgressData::min(), zypp::ProgressData::reportAlive(), zypp::ProgressData::tick(), and zypp::ProgressData::val().
ProgressData& zypp::CombinedProgressData::_pd [private] |
1.5.3