52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
|
|
#ifndef AISE_ENGINE_HPP
|
|||
|
|
#define AISE_ENGINE_HPP
|
|||
|
|
|
|||
|
|
#include "aise/types.hpp"
|
|||
|
|
#include <memory>
|
|||
|
|
#include <functional>
|
|||
|
|
|
|||
|
|
namespace aise {
|
|||
|
|
|
|||
|
|
// ── 前置声明各模块 ──
|
|||
|
|
class RequirementsModule;
|
|||
|
|
class CodegenModule;
|
|||
|
|
class TestingModule;
|
|||
|
|
|
|||
|
|
// ── AISE 引擎:模块注册与调度 ──
|
|||
|
|
class Engine {
|
|||
|
|
public:
|
|||
|
|
Engine();
|
|||
|
|
~Engine();
|
|||
|
|
|
|||
|
|
// 禁止拷贝
|
|||
|
|
Engine(const Engine&) = delete;
|
|||
|
|
Engine& operator=(const Engine&) = delete;
|
|||
|
|
|
|||
|
|
// ── 初始化与启动 ──
|
|||
|
|
bool initialize();
|
|||
|
|
void shutdown();
|
|||
|
|
bool is_running() const { return running_; }
|
|||
|
|
|
|||
|
|
// ── 模块访问 ──
|
|||
|
|
RequirementsModule& requirements() { return *req_mod_; }
|
|||
|
|
CodegenModule& codegen() { return *codegen_mod_; }
|
|||
|
|
TestingModule& testing() { return *test_mod_; }
|
|||
|
|
|
|||
|
|
// ── 顶层 API(模拟外部 REST 接口) ──
|
|||
|
|
ApiResponse processRequest(const ApiRequest& req);
|
|||
|
|
|
|||
|
|
// ── 版本信息 ──
|
|||
|
|
static const char* version() { return "1.0.0"; }
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
bool running_ = false;
|
|||
|
|
|
|||
|
|
std::unique_ptr<RequirementsModule> req_mod_;
|
|||
|
|
std::unique_ptr<CodegenModule> codegen_mod_;
|
|||
|
|
std::unique_ptr<TestingModule> test_mod_;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
} // namespace aise
|
|||
|
|
|
|||
|
|
#endif // AISE_ENGINE_HPP
|