载入中...
搜索中...
未找到
SoftRestart.hpp
浏览该文件的文档.
1#pragma once
2
12#include "common/Export.h"
13#include "common/Result.h"
14
15#include <Poco/JSON/Object.h>
16
17#include <cstddef>
18#include <cstdint>
19#include <string>
20
21struct SQVM;
22typedef struct SQVM* HSQUIRRELVM;
23
24namespace eve::dev {
25
32 Poco::JSON::Object::Ptr args;
38 bool reloadScripts = true;
39};
40
47 std::size_t resourceCountBefore = 0;
49 std::size_t resourceCountAfter = 0;
51 bool scriptsReloaded = false;
53 bool initCalled = false;
55 Poco::JSON::Object::Ptr args;
56};
57
71
76[[nodiscard]] EVENGINE_API_FOUNDATION std::uint32_t resetNativeStateProviders();
77
81[[nodiscard]] EVENGINE_API_FOUNDATION std::size_t resourceCacheCount();
82
83} // namespace eve::dev
struct SQVM * HSQUIRRELVM
HSQUIRRELVM vm
Definition ECS.cpp:20
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
const GltfImportRequest & request
Move-only, checked operation results for the common layer.
struct SQVM * HSQUIRRELVM
Move-only operation result carrying either a value or Status.
Definition Result.h:155
std::size_t resourceCacheCount()
Current ResourceManager cache entry count (for restart telemetry).
std::uint32_t resetNativeStateProviders()
Reset every registered IStateProvider to its defaults.
Result< SoftRestartReport > executeSoftRestart(HSQUIRRELVM vm, SoftRestartRequest request)
Soft-restart the game attached to vm.
Outcome of a successful soft restart. @ownership Owning value; safe to keep across frames.
bool scriptsReloaded
Whether tracked scripts were re-dofile'd.
Poco::JSON::Object::Ptr args
Echo of the args table that was installed (may be empty).
std::size_t resourceCountBefore
Cached resource entries before the restart (must equal after).
bool initCalled
Whether eve_init / eve_restart ran.
std::size_t resourceCountAfter
Cached resource entries after the restart.
Inputs for one soft restart. @thread Game / MCP poll thread only.
bool reloadScripts
When true (default), re-dofile tracked scripts after clearing persist/state roots so initializers run...
Poco::JSON::Object::Ptr args
Optional JSON object exposed to scripts as eve.restartArgs.