17#ifndef MS_PROGRESS_INFO_HPP
18#define MS_PROGRESS_INFO_HPP
25namespace matrix_science
33 class ms_progress_info;
63 void clear(
const std::string & description =
"",
size_t total = 0);
65 STATUS getStatus()
const;
67 const std::string & getDescription()
const;
69 size_t getTotal()
const;
71 size_t getProgress()
const;
73 int getNumberOfSubtasks()
const;
77 void setBreak()
const;
80 ms_progress_info * addSubtask(
const std::string & description,
size_t total);
84 void updateProgress(
size_t progress,
size_t total);
90 void updateComplete();
92 void updateIndeterminate();
94 bool isBreaking()
const;
96 void removeSubtask(
int index);
103 std::string description_;
114 std::list<std::pair<bool, ms_progress_info*> > subtasks_;
Contains information of the current progress of a task being performed.
Definition: ms_progress_info.hpp:40
STATUS
Enum containing progress status information values.
Definition: ms_progress_info.hpp:44
@ S_STOPPED_BREAK
Task was cancelled by the user.
Definition: ms_progress_info.hpp:49
@ S_STOPPED_FAIL
Task failed.
Definition: ms_progress_info.hpp:48
@ S_RUNNING
Task is currently running.
Definition: ms_progress_info.hpp:46
@ S_NOT_STARTED
Task has not started.
Definition: ms_progress_info.hpp:45
@ S_RUNNING_INDETERMINATE
Task is running but progress is indeterminate.
Definition: ms_progress_info.hpp:47