42 [[nodiscard]]
virtual std::unique_ptr<ProgressTask>
BeginSubTask(std::string_view title, std::uint64_t total) = 0;
46 virtual void SetTotal(std::uint64_t total) = 0;
51 virtual void Advance(std::uint64_t count = 1, std::string_view detail = {}) = 0;
56 virtual void Log(
LogLevel level, std::string_view message) = 0;
63 virtual void Fail(std::string_view reason) = 0;
71 [[nodiscard]] std::unique_ptr<ProgressTask>
BeginSubTask(std::string_view , std::uint64_t )
override
73 return std::make_unique<NullProgressTask>();
80 void Advance(std::uint64_t , std::string_view )
override {}
92 void Fail(std::string_view )
override {}
A ProgressTask that reports nothing and is never cancelled; used where a host passes none.
void SetTotal(std::uint64_t) override
Does nothing.
void Advance(std::uint64_t, std::string_view) override
Does nothing.
void Fail(std::string_view) override
Does nothing.
void Log(LogLevel, std::string_view) override
Does nothing.
std::unique_ptr< ProgressTask > BeginSubTask(std::string_view, std::uint64_t) override
bool IsCancellationRequested() const override
Progress of one task, which the library reports and a host (a CLI, a GUI) renders.
virtual void Advance(std::uint64_t count=1, std::string_view detail={})=0
virtual void Log(LogLevel level, std::string_view message)=0
virtual std::unique_ptr< ProgressTask > BeginSubTask(std::string_view title, std::uint64_t total)=0
virtual void SetTotal(std::uint64_t total)=0
LogLevel
Severity of a message reported against a task.
virtual bool IsCancellationRequested() const =0
virtual void Fail(std::string_view reason)=0
virtual ~ProgressTask()=default
Marks the task finished.