-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·33 lines (25 loc) · 802 Bytes
/
Copy pathmain.cpp
File metadata and controls
executable file
·33 lines (25 loc) · 802 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
25
26
27
28
29
30
31
32
33
#include <QApplication>
#include "config_manager.hpp"
#include "flow_logger.hpp"
#include "mainwindow.h"
#include "simulation_controller.hpp"
int main(int argc, char* argv[])
{
QApplication a(argc, argv);
auto& config = ConfigManager::instance();
if (!config.load("../config.yaml")) {
qCritical() << "Failed to load config. Simulation aborted.";
return -1;
}
auto pack = config.getSettingsPack();
if (!pack) {
qCritical() << "SettingsPack is empty";
return EXIT_FAILURE;
}
FlowLogger::setup(pack->getFlowLoggerInfo());
auto controller = std::make_shared<SimulationController>(pack.value());
MainWindow w(controller);
controller->startSimulation();
w.show();
return a.exec();
}