10#ifndef ZYPP_ParserProgress_H
11#define ZYPP_ParserProgress_H
13#include <boost/shared_ptr.hpp>
14#include <boost/function.hpp>
25 typedef boost::shared_ptr<ParserProgress>
Ptr;
33 ParserProgress( boost::function<
void (
long int)> fnc,
long int total_steps = 100 )
53 long int current_done = p;
54 p = (
long int)(((
double) current_done/(
double)
_total_steps)*100);
96 boost::function<void (
long int)>
_fnc;
boost::function< void(long int)> _fnc
boost::shared_ptr< ParserProgress > Ptr
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,...
long int _previous_progress
void setTotalSteps(long int total_steps)
void start()
report progress started
void progress(long int p)
report progress, which in most cases executes the functor associated with this progress object to upd...
void finish()
report progress finished
Easy-to use interface to the ZYPP dependency resolver.