Files
terminal_status_line/Progress.h

27 lines
536 B
C++

#ifndef PROGRESS_H_
#define PROGRESS_H_
#include <ostream>
#include <string>
class Progress
{
protected:
std::string m_message;
size_t m_current;
public:
Progress(const std::string& message, size_t current = 0);
virtual ~Progress() = default;
void set_message(const std::string& message);
virtual void set_progress(size_t current);
virtual void increment_progress(size_t inc = 1);
virtual std::string print_progress() const;
};
std::ostream& operator<<(std::ostream& out, const Progress& progress);
#endif // PROGRESS_H_