Default progress is now infinite. Finite is moved to new class

This commit is contained in:
2026-05-29 17:15:38 +03:00
parent 89c5629176
commit c38665fd0c
7 changed files with 126 additions and 54 deletions

22
ProgressFinite.h Normal file
View 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_