载入中...
搜索中...
未找到
RuntimeSnapshot.h 文件参考

Shared SnapshotEnvelope codec for typed definition runtime instances. 更多...

#include "common/Snapshot.h"
#include "common/definitions/DefinitionRuntime.h"
#include <charconv>
#include <cstdint>
#include <functional>
#include <set>
#include <string>
#include <string_view>

浏览源代码.

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::definition
 
namespace  eve::definition::detail
 

类型定义

template<class State >
using eve::definition::RuntimeStateEncoder = std::function< eve::Result< eve::Value >(const State &)>
 Converts one domain-owned runtime state into an owning Value.
 
template<class State >
using eve::definition::RuntimeStateDecoder = std::function< eve::Result< State >(const eve::Value &)>
 Decodes one domain-owned runtime state from an owning Value.
 

函数

eve::Result< std::uint64_t > eve::definition::detail::runtimeSnapshotUint (const eve::Value &value, std::string_view path)
 Runtime snapshot uint.
 
eve::Result< void > eve::definition::detail::runtimeSnapshotShape (const eve::Value::Object &object)
 Runtime snapshot shape.
 
template<class State >
eve::Result< eve::SnapshotEnvelope > eve::definition::snapshotRuntimeInstance (const RuntimeInstance< State > &runtime, std::string type, eve::LogicalId schema, eve::SchemaVersion schemaVersion, eve::Revision revision, eve::SimulationTick tick, const eve::SnapshotHashProvider &hashProvider, const RuntimeStateEncoder< State > &encode)
 Capture a typed runtime instance in the common snapshot envelope.
 
template<class State >
eve::Result< void > eve::definition::restoreRuntimeInstance (RuntimeInstance< State > &runtime, const eve::SnapshotEnvelope &snapshot, std::string_view expectedType, const eve::LogicalId &expectedSchema, eve::SchemaVersion expectedVersion, const eve::SnapshotHashProvider &hashProvider, const RuntimeStateDecoder< State > &decode)
 Verify and atomically restore a typed runtime instance.
 

详细描述

Shared SnapshotEnvelope codec for typed definition runtime instances.

The codec owns only the stable identity/instance-state envelope shape. A domain supplies an encoder and decoder for its typed state. Definitions are intentionally referenced, not copied into this common protocol: the registry remains the sole owner of definition data.

在文件 RuntimeSnapshot.h 中定义.