Files
eUi/include/eui_singleton/singletonService.h
T
RCiRoot e3f7733316 V20260829-2.6.1
完成框架目录和模块重构;新增核心、单例、工具、加密及框架 SDK;统一任务、相机和 RPC 接口,并增加离线检测、相机标定、备份恢复、版本管理、崩溃守护和心跳监控功能。
2026-09-20 16:01:09 +08:00

57 lines
1.2 KiB
C++

#pragma once
#include <euiSingletonGlobal.h>
#include <appConfig.h>
#include <systemConfig.h>
#include <timedTask.h>
#include <translation.h>
class EUI_SERVICE_API singletonService {
public:
static singletonService& getInstance();
singletonService(const singletonService&) = delete;
singletonService& operator=(const singletonService&) = delete;
void init();
void release();
appConfig& config();
const appConfig& config() const;
systemConfig& configStore();
const systemConfig& configStore() const;
Translation& translation();
const Translation& translation() const;
TimedTask& timedTask();
const TimedTask& timedTask() const;
private:
// 单例:仅允许 getInstance 内部构造
singletonService();
~singletonService();
enum class LifecycleState {
Created,
Initialized,
Releasing,
Released,
};
void initializeCoreServices();
void initializeConfigServices();
void releaseConfigServices();
void releaseCoreServices();
LifecycleState lifecycleState_ = LifecycleState::Created;
Translation translation_;
systemConfig systemConfig_;
appConfig appConfig_;
TimedTask timedTask_;
};