libzypp 17.31.23
|
Progress callback from another progress. More...
#include <ui/progressdata.h>
Public Member Functions | |
CombinedProgressData (ProgressData &pd, ProgressData::value_type weight=0) | |
Ctor. | |
bool | operator() (const ProgressData &progress) |
Implements the ProgressData::ReceiverFnc callback interface. | |
Private Attributes | |
ProgressData::value_type | _weight |
ProgressData::value_type | _last_value |
ProgressData & | _pd |
Progress callback from another progress.
This class allows you to pass a progress callback to a subtask based on a current progress data, plus a weight value. Every progress reported by the subtask via this callback will be forwarded to the main progress data, with the corresponding weight.
Example:
Definition at line 393 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. |
If weight is 0, or
pd | only reports keepalives. then only ticks are sent. |
Definition at line 132 of file progressdata.cc.
bool zypp::CombinedProgressData::operator() | ( | const ProgressData & | progress | ) |
Implements the ProgressData::ReceiverFnc callback interface.
Definition at line 141 of file progressdata.cc.
|
private |
Definition at line 420 of file progressdata.h.
|
private |
Definition at line 421 of file progressdata.h.
|
private |
Definition at line 422 of file progressdata.h.