libzypp  17.32.4
zypp::parser::ParserProgress Class Reference

#include <zypp/parser/ParserProgress.h>

Public Types

using Ptr = boost::shared_ptr< ParserProgress >
 

Public Member Functions

 ParserProgress (boost::function< void(long int)> fnc, long int total_steps=100)
 initializes a progress objetc, with a callback functor if you are not reporting percentage, then set the total_steps to the goal, and report using the same unit, then More...
 
 ~ParserProgress ()
 
void progress (long int p)
 report progress, which in most cases executes the functor associated with this progress object to update progress information More...
 
void setTotalSteps (long int total_steps)
 
void finish ()
 report progress finished More...
 
void start ()
 report progress started More...
 

Private Attributes

boost::function< void(long int)> _fnc
 
long int _previous_progress
 
long int _total_steps
 

Detailed Description

Definition at line 23 of file ParserProgress.h.

Member Typedef Documentation

◆ Ptr

Definition at line 26 of file ParserProgress.h.

Constructor & Destructor Documentation

◆ ParserProgress()

zypp::parser::ParserProgress::ParserProgress ( boost::function< void(long int)>  fnc,
long int  total_steps = 100 
)
inline

initializes a progress objetc, with a callback functor if you are not reporting percentage, then set the total_steps to the goal, and report using the same unit, then

Definition at line 34 of file ParserProgress.h.

◆ ~ParserProgress()

zypp::parser::ParserProgress::~ParserProgress ( )
inline

Definition at line 40 of file ParserProgress.h.

Member Function Documentation

◆ progress()

void zypp::parser::ParserProgress::progress ( long int  p)
inline

report progress, which in most cases executes the functor associated with this progress object to update progress information

Definition at line 49 of file ParserProgress.h.

◆ setTotalSteps()

void zypp::parser::ParserProgress::setTotalSteps ( long int  total_steps)
inline

Definition at line 65 of file ParserProgress.h.

◆ finish()

void zypp::parser::ParserProgress::finish ( )
inline

report progress finished

Definition at line 73 of file ParserProgress.h.

◆ start()

void zypp::parser::ParserProgress::start ( )
inline

report progress started

Definition at line 86 of file ParserProgress.h.

Member Data Documentation

◆ _fnc

boost::function<void (long int)> zypp::parser::ParserProgress::_fnc
private

Definition at line 97 of file ParserProgress.h.

◆ _previous_progress

long int zypp::parser::ParserProgress::_previous_progress
private

Definition at line 98 of file ParserProgress.h.

◆ _total_steps

long int zypp::parser::ParserProgress::_total_steps
private

Definition at line 99 of file ParserProgress.h.


The documentation for this class was generated from the following file: