Files
energy_storage/src/app/Application.h

37 lines
555 B
C
Raw Normal View History

2025-05-19 09:54:33 +08:00
#pragma once
#include <thread>
#include "common/Logger.h"
2025-05-19 09:54:33 +08:00
#include "Operator.h"
#include "app/AppData.h"
2025-05-19 09:54:33 +08:00
class Application
{
public:
static Application& instance()
{
static Application app;
return app;
}
void init();
AppData& getAppData();
2025-05-19 09:54:33 +08:00
bool isQuit() { return isQuit_; }
Operator& getOperator() { return op_; }
void runThreadMain();
void runThreadDevice();
public:
2025-05-19 09:54:33 +08:00
bool isQuit_ = false;
// 登录的管理员信息
Operator op_;
// 应用数据
AppData appdata_;
2025-05-19 09:54:33 +08:00
};