-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsoleManager.h
More file actions
24 lines (22 loc) · 822 Bytes
/
ConsoleManager.h
File metadata and controls
24 lines (22 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <iostream>
#include <thread>
#include <chrono>
#include <string>
#include <vector>
/**
Klasa zarz¹daj¹ca konsol¹.
*/
class ConsoleManager
{
private:
ConsoleManager() = default;
ConsoleManager(const ConsoleManager&) = delete;
ConsoleManager(ConsoleManager&&) = delete;
public:
static ConsoleManager& get_console_manager();
int show_menu(std::vector<std::string> algorithm_names) const; // Funkcja pokazuj¹ca menu, zwraca wybran¹ przez u¿ytkownika opcjê.
int get_accuracy() const; // Funkcja wyœwietlaj¹ca monit o ustalenie dok³adnoœci obliczeñ, zwraca liczbê naturaln¹ - stopieñ dok³adnoœci, np. iloœæ wyrazów szeregu do zsumowania.
void show_error(const std::string & error_info) const; // Wyœwietla komunikat b³êdu.
void update_result(double result) const; // Wyœwietla wynik obliczeñ.
};