Default progress is now infinite. Finite is moved to new class
This commit is contained in:
22
ProgressFinite.h
Normal file
22
ProgressFinite.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef PROGRESS_FINITE_H_
|
||||
#define PROGRESS_FINITE_H_
|
||||
|
||||
#include "Progress.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
class ProgressFinite : public Progress
|
||||
{
|
||||
protected:
|
||||
size_t m_total;
|
||||
public:
|
||||
ProgressFinite(const std::string& message, size_t total, size_t current = 0);
|
||||
|
||||
virtual void set_total(size_t total);
|
||||
virtual void set_progress(size_t current) override;
|
||||
virtual void increment_progress(size_t inc = 1);
|
||||
virtual std::string print_progress() const override;
|
||||
};
|
||||
|
||||
#endif // PROGRESS_FINITE_H_
|
||||
Reference in New Issue
Block a user