// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: progress.cc,v 1.4 1998/07/26 04:51:45 jgg Exp $
+// $Id: progress.cc,v 1.5 1998/08/23 03:52:22 jgg Exp $
/* ######################################################################
OpProgress - Operation Progress
}
MajorChange = false;
+ if (SubOp != LastSubOp)
+ {
+ LastSubOp = SubOp;
+ return true;
+ }
+
if ((int)LastPercent == (int)Percent)
return false;
- LastPercent = Percent;
// Check time delta
struct timeval Now;
if (Diff < Interval)
return false;
LastTime = Now;
+ LastPercent = Percent;
return true;
}
/*}}}*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: progress.h,v 1.1 1998/07/21 05:33:21 jgg Exp $
+// $Id: progress.h,v 1.2 1998/08/23 03:52:23 jgg Exp $
/* ######################################################################
OpProgress - Operation Progress
// Change reduction code
struct timeval LastTime;
string LastOp;
+ string LastSubOp;
protected:
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() {};
};
public:
- void Done();
+ virtual void Done();
OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate), LastLen(0) {};
virtual ~OpTextProgress() {Done();};