libzypp
13.10.6
|
Progress callback from another progress. More...
#include <ProgressData.h>
Public Member Functions | |
CombinedProgressData (ProgressData &pd, ProgressData::value_type weight=0) | |
Ctor. More... | |
bool | operator() (const ProgressData &progress) |
Implements the ProgressData::ReceiverFnc callback interface. More... | |
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 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. |
If weight is 0, or
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.
|
private |
Definition at line 414 of file ProgressData.h.
|
private |
Definition at line 415 of file ProgressData.h.
|
private |
Definition at line 416 of file ProgressData.h.