From 04bf753d3fcfb07e846033f62a4065216d6b7720 Mon Sep 17 00:00:00 2001 From: Doralitze <doralitze@chaotikum.org> Date: Sat, 9 Mar 2019 20:24:49 +0100 Subject: [PATCH] add: further structure --- src/ui/progress_indicator.hpp | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/ui/progress_indicator.hpp diff --git a/src/ui/progress_indicator.hpp b/src/ui/progress_indicator.hpp new file mode 100644 index 0000000..93f713a --- /dev/null +++ b/src/ui/progress_indicator.hpp @@ -0,0 +1,40 @@ +#pragma once + +#include <memory> +#include <string> + +namespace rmrf::ui { + +/** + * This class is used to share progress information on running tasks. + */ +class progress_indicator { +public: + /** + * Query the progress state + * @return The current progress in percent + */ + virtual int get_progress(); + /** + * This method shall be used in order to obtain + * the total amount of steps to be done. + */ + virtual int get_total_work(); + /** + * This method shall be used to retrieve the + * current progress as a number of finished jobs. + */ + virtual int get_current_work(); + /** + * This method shall be used in order to obtain the + * description of the total operation. + */ + virtual shared_ptr<string> get_operation_description(); + /** + * This method shall be used in order to retrieve a + * description of the current step. + */ + virtual shared_ptr<string> get_current_job_description(); +} + +} -- GitLab