// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: progress.h,v 1.1 1998/07/21 05:33:21 jgg Exp $
+// $Id: progress.h,v 1.6 2001/05/07 05:06:52 jgg Exp $
/* ######################################################################
OpProgress - Operation Progress
##################################################################### */
/*}}}*/
-// Header section: pkglib
#ifndef PKGLIB_PROGRESS_H
#define PKGLIB_PROGRESS_H
#include <string>
#include <sys/time.h>
+using std::string;
+
+class Configuration;
class OpProgress
{
unsigned long Current;
// Change reduction code
struct timeval LastTime;
string LastOp;
+ string LastSubOp;
protected:
public:
void Progress(unsigned long Current);
+ void SubProgress(unsigned long SubTotal);
void SubProgress(unsigned long SubTotal,string Op);
void OverallProgress(unsigned long Current,unsigned long Total,
unsigned long Size,string Op);
-
+ virtual void Done() {};
+
OpProgress();
virtual ~OpProgress() {};
};
string OldOp;
bool NoUpdate;
+ bool NoDisplay;
unsigned long LastLen;
virtual void Update();
void Write(const char *S);
public:
- void Done();
+ virtual void Done();
- OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate), LastLen(0) {};
+ OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate),
+ NoDisplay(false), LastLen(0) {};
+ OpTextProgress(Configuration &Config);
virtual ~OpTextProgress() {Done();};
};