载入中...
搜索中...
未找到
ScriptComponentStore.h
浏览该文件的文档.
24 std::uint64_t entityId = 0;
30 friend bool operator<(const ScriptComponentStoreKey& a, const ScriptComponentStoreKey& b) noexcept {
46[[nodiscard]] EVENGINE_API_FOUNDATION Result<void> setScriptComponentValues(const ScriptComponentStoreKey& key,
56[[nodiscard]] EVENGINE_API_FOUNDATION const Value* findScriptComponentValues(const ScriptComponentStoreKey& key);
62[[nodiscard]] EVENGINE_API_FOUNDATION Result<Value> scriptComponentField(const ScriptComponentStoreKey& key,
71[[nodiscard]] EVENGINE_API_FOUNDATION Result<void> setScriptComponentField(const ScriptComponentStoreKey& key,
89[[nodiscard]] EVENGINE_API_FOUNDATION std::vector<ScriptComponentStoreEntry> scriptComponentStoreEntries();
97EVENGINE_API_FOUNDATION void replaceScriptComponentValues(std::vector<ScriptComponentStoreEntry> entries);
112EVENGINE_API_FOUNDATION void reconcileScriptComponentValues(const std::string& name, SchemaVersion version,
#define EVENGINE_API_FOUNDATION_INLINE
仅供"只有内联成员"的类型使用的组宏:拥有者 dllexport,消费方不导入。
Definition Export.h:170
Move-only, checked operation results for the common layer.
Persistent data-contract version identity.
Owning, renderer-independent dynamic values.
std::size_t removeScriptComponentValues(std::uint64_t entityId)
实体销毁时清掉它的全部组件数据。
Definition ScriptComponentStore.cpp:111
const Value * findScriptComponentValues(const ScriptComponentStoreKey &key)
读一条组件数据。
Definition ScriptComponentStore.cpp:41
void replaceScriptComponentValues(std::vector< ScriptComponentStoreEntry > entries)
用给定条目**整体替换**存储(恢复快照用)。
Definition ScriptComponentStore.cpp:81
Result< void > setScriptComponentValues(const ScriptComponentStoreKey &key, Value values)
写入一条组件的引擎侧数据(创建实体、或迁移到新代时调用)。
Definition ScriptComponentStore.cpp:32
std::uint64_t scriptComponentStoreRevision()
存储的单调版本号:任何一次写(含恢复、换代对齐、实体销毁)都会 +1。
Definition ScriptComponentStore.cpp:133
Result< void > setScriptComponentField(const ScriptComponentStoreKey &key, const std::string &field, Value value)
写一个字段(脚本侧的写入与原生侧的写入都走这里)。
Definition ScriptComponentStore.cpp:59
std::vector< ScriptComponentStoreEntry > scriptComponentStoreEntries()
列出存储里的全部条目,按 (实体, 组件名, 版本) 升序。
Definition ScriptComponentStore.cpp:73
void reconcileScriptComponentValues(const std::string &name, SchemaVersion version, const std::vector< std::string > &fields, const std::vector< Value > &defaults)
把某个组件(名字 + 版本)在**所有实体**上的数据重建到新 schema 上(热重载换代)。
Definition ScriptComponentStore.cpp:88
Result< Value > scriptComponentField(const ScriptComponentStoreKey &key, const std::string &field)
读一个字段。
Definition ScriptComponentStore.cpp:47
friend bool operator<(const ScriptComponentStoreKey &a, const ScriptComponentStoreKey &b) noexcept
Definition ScriptComponentStore.h:30