Default progress is now infinite. Finite is moved to new class
This commit is contained in:
26
ProgressInfinite.h
Normal file
26
ProgressInfinite.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef PROGRESS_INFINITE_H_
|
||||
#define PROGRESS_INFINITE_H_
|
||||
|
||||
#include "Progress.h"
|
||||
|
||||
class ProgressInfinite : public Progress
|
||||
{
|
||||
protected:
|
||||
size_t m_current;
|
||||
|
||||
std::string m_message;
|
||||
|
||||
public:
|
||||
Progress(const std::string& message, size_t current = 0);
|
||||
|
||||
virtual void set_progress(size_t current);
|
||||
void set_message(const std::string& message);
|
||||
|
||||
virtual void increment_progress(size_t inc = 1);
|
||||
|
||||
virtual std::string print_progress();
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const Progress& progress);
|
||||
};
|
||||
|
||||
#endif // PROGRESS_INFINITE_H_
|
||||
Reference in New Issue
Block a user