载入中...
搜索中...
未找到
TacticsGameSaveParticipant.cpp
浏览该文件的文档.
22TacticsGameSaveParticipant::TacticsGameSaveParticipant(Battle& battle, SnapshotHashProvider hashProvider)
33Result<std::unique_ptr<IPreparedGameRestore>> TacticsGameSaveParticipant::prepare(const Value& state) {
35 if (!snapshot.ok()) return Result<std::unique_ptr<IPreparedGameRestore>>::failure(snapshot.status());
37 if (!prepared.ok()) return Result<std::unique_ptr<IPreparedGameRestore>>::failure(prepared.status());
Versioned battle snapshots with transactional restore.
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Battle short-root and authoritative owner of board and turn state.
Definition TacticsTypes.h:444
TacticsGameSaveParticipant(Battle &battle, SnapshotHashProvider hashProvider)
Battle and digest contract must remain stable for this adapter's lifetime.
Definition TacticsGameSaveParticipant.cpp:22
Result< std::unique_ptr< IPreparedGameRestore > > prepare(const Value &state) override
Validate and prepare a no-fail commit without changing live state.
Definition TacticsGameSaveParticipant.cpp:33
std::string_view saveKey() const noexcept override
Stable unique participant key within the game-save schema.
Definition TacticsGameSaveParticipant.cpp:25
Result< Value > capture() const override
Capture an independent owning snapshot of this domain.
Definition TacticsGameSaveParticipant.cpp:27
static Result< SnapshotEnvelope > snapshot(Battle &battle, const SnapshotHashProvider &hashProvider)
Capture a version-one, integrity-sealed battle snapshot.
Definition TacticsPersistence.cpp:1184
static Result< PreparedRestore > prepareRestore(Battle &battle, const SnapshotEnvelope &snapshot, const SnapshotHashProvider &hashProvider)
Verify and resolve a battle snapshot without changing live state. @thread Owning simulation thread; b...
Definition TacticsPersistence.cpp:1314
static void commitPrepared(PreparedRestore prepared) noexcept
Publish a previously prepared battle state without further fallible work.
Definition TacticsPersistence.cpp:1345
Definition Interaction.cpp:13
Result< VehiclePhysicsStatus > commit(physics::World &world, physics::ForceBatch &batch, std::shared_ptr< VehicleWheelRuntime > &runtime, std::vector< VehicleEntity::SuspensionState::WheelState > candidate, const SimulationStep &step)
Definition VehicleTireRuntime.cpp:87
Result< Value > snapshotEnvelopeValue(const SnapshotEnvelope &snapshot)
Convert an envelope to its strict canonical value representation.
Definition Snapshot.cpp:121
Result< SnapshotEnvelope > parseSnapshotEnvelopeValue(const Value &value, const SnapshotHashProvider &hashProvider)
Parse and verify an envelope from an owning Value.
Definition Snapshot.cpp:136
std::function< Result< ContentId >(std::string_view canonicalInput)> SnapshotHashProvider
Injected content-digest implementation used by snapshots.
Definition Snapshot.h:36
Definition Container.h:602