2016-08-05 20:29:48 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "util/Progress.hh"
|
|
|
|
|
|
|
|
namespace gr {
|
|
|
|
|
|
|
|
class ProgressBar: public Progress
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProgressBar();
|
|
|
|
virtual ~ProgressBar();
|
|
|
|
|
|
|
|
void reportProgress(u64_t total, u64_t processed);
|
|
|
|
void setShowProgressBar(bool showProgressBar);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void printBytes(u64_t bytes);
|
|
|
|
static unsigned short int determineTerminalSize();
|
|
|
|
|
|
|
|
bool showProgressBar;
|
2016-09-30 12:33:11 +03:00
|
|
|
int last;
|
2016-08-05 20:29:48 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
;
|