-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConfigurator.h
80 lines (66 loc) · 2.59 KB
/
Configurator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* © 2024 Peter Cole
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* It is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this code. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef CONFIGURATOR_H
#define CONFIGURATOR_H
#include "Controller.h"
#include "Defines.h"
#include "DisplayManager.h"
#include "InputManager.h"
#include "Logger.h"
#include "ScreenManager.h"
class Configurator {
public:
/// @brief Constructor for this Configurator
/// @param consoleStream Pointer to the Stream for console interaction
/// @param commandStationStream Pointer to the Stream for the CommandStation connection
/// @param logLevel LogLevel to set (default WARN)
Configurator(Stream *consoleStream, Stream *commandStationStream, LogLevel logLevel = LogLevel::LOG_WARN);
/// @brief Call all one-shot initialisation or begin methods on startup
void initialise();
/// @brief Get the console Stream instance for this configurator
/// @return Pointer to the Stream
Stream *getConsoleStream();
/// @brief Get the CommandStation connection Stream instance for this configurator
/// @return Pointer to the Stream
Stream *getCommandStationStream();
/// @brief Get the Logger instance for this Configurator
/// @return Pointer to the Logger
Logger *getLogger();
/// @brief Get the DisplayManager instance for this Configurator
/// @return Pointer to the DisplayManager
DisplayManager *getDisplayManager();
/// @brief Get the InputManager instance for this Configurator
/// @return Pointer to the InputManager
InputManager *getInputManager();
/// @brief Get the ScreenManager instance for this Configurator
/// @return Pointer to the ScreenManager
ScreenManager *getScreenManager();
/// @brief Get the Controller instance for this Configurator
/// @return Pointer to the Controller
Controller *getController();
/// @brief Destructor for the Configurator
~Configurator();
private:
Stream *_consoleStream;
Stream *_commandStationStream;
Logger *_logger;
DisplayManager *_displayManager;
InputManager *_inputManager;
ScreenManager *_screenManager;
Controller *_controller;
};
#endif // CONFIGURATOR_H