// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: progress.h,v 1.1 1998/07/21 05:33:21 jgg Exp $
+// $Id: progress.h,v 1.4 1998/10/02 04:39:54 jgg Exp $
/* ######################################################################
OpProgress - Operation Progress
#include <string>
#include <sys/time.h>
+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();};
};