载入中...
搜索中...
未找到
ScriptComponentSnapshot.h
浏览该文件的文档.
45 std::uint64_t entityId = 0;
68[[nodiscard]] EVENGINE_API_FOUNDATION Result<std::vector<ScriptComponentInstanceState>> scriptComponentInstancesOf(
92 PersistentId instanceId, Revision revision, SimulationTick tick, const SnapshotHashProvider& hashProvider);
107[[nodiscard]] EVENGINE_API_FOUNDATION Result<void> restoreScriptComponents(const SnapshotEnvelope& snapshot,
112 PersistentId instanceId, Revision revision, SimulationTick tick, const SnapshotHashProvider& hashProvider);
#define EVENGINE_API_FOUNDATION_INLINE
仅供"只有内联成员"的类型使用的组宏:拥有者 dllexport,消费方不导入。
Definition Export.h:170
Runtime replacement generation for stale-handle rejection.
Strong identity values shared by persistence, content and logical-name APIs.
Move-only, checked operation results for the common layer.
Monotonic state revision for concurrency and change checks.
Persistent data-contract version identity.
Versioned, integrity-checked persistence envelopes.
Common time values and an injectable deterministic simulation clock.
Owning, renderer-independent dynamic values.
Human-readable, scoped identifier in the form namespace:name.
Definition Identity.h:414
EVENGINE_API_FOUNDATION Result< std::string > scriptComponentStatesJson()
引擎侧脚本组件数据的**工具视图**(MCP eve_script_components 与诊断用)。
Definition ScriptComponentSnapshot.cpp:280
EVENGINE_API_FOUNDATION Result< std::string > serializeScriptComponentSnapshot(PersistentId instanceId, Revision revision, SimulationTick tick, const SnapshotHashProvider &hashProvider)
采集并序列化成确定性 JSON(存档写盘用)。 @cost 同 snapshotScriptComponents + 一次序列化。
Definition ScriptComponentSnapshot.cpp:174
constexpr const char * kScriptComponentSnapshotType
脚本组件快照的稳定类型(SnapshotEnvelope::type)。
Definition ScriptComponentSnapshot.h:29
EVENGINE_API_FOUNDATION Result< void > restoreScriptComponents(const SnapshotEnvelope &snapshot, const SnapshotHashProvider &hashProvider)
用快照里的数据**整体替换**当前的脚本组件数据。
Definition ScriptComponentSnapshot.cpp:93
EVENGINE_API_FOUNDATION LogicalId scriptComponentSnapshotSchema()
脚本组件快照的 payload schema:eve:script-components 版本 1。
Definition ScriptComponentSnapshot.cpp:68
EVENGINE_API_FOUNDATION Result< std::vector< ScriptComponentInstanceState > > scriptComponentInstancesOf(const ssq::Object &entityInstance)
读一个脚本实体实例上挂着的全部**已登记**组件的状态。
Definition ScriptComponentSnapshot.cpp:187
std::function< Result< ContentId >(std::string_view canonicalInput)> SnapshotHashProvider
Injected content-digest implementation used by snapshots.
Definition Snapshot.h:36
EVENGINE_API_FOUNDATION Result< void > restoreScriptComponentSnapshotJson(std::string_view json, const SnapshotHashProvider &hashProvider)
从 JSON 解析、校验并恢复。
Definition ScriptComponentSnapshot.cpp:181
EVENGINE_API_FOUNDATION Result< SnapshotEnvelope > snapshotScriptComponents(PersistentId instanceId, Revision revision, SimulationTick tick, const SnapshotHashProvider &hashProvider)
把引擎侧的脚本组件数据封成一个快照信封。
Definition ScriptComponentSnapshot.cpp:74
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:21
一个脚本实体实例上某个组件的**当前状态**(供引擎工具读取)。
Definition ScriptComponentSnapshot.h:38
Value::Object fields
字段名 → 当前值,按注册表记录的**声明顺序**收集( inspector 需要稳定顺序)。
Definition ScriptComponentSnapshot.h:53
Stable outer format shared by persistence and cross-process snapshots.
Definition Snapshot.h:46