载入中...
搜索中...
未找到
TacticsPersistence.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "common/Snapshot.h"
10
11#include <string_view>
12
13namespace eve::tactics {
14
24public:
26 [[nodiscard]] static Result<SnapshotEnvelope> snapshot(Battle& battle,
27 const SnapshotHashProvider& hashProvider);
29 [[nodiscard]] static Result<void> restore(Battle& battle, const SnapshotEnvelope& snapshot,
30 const SnapshotHashProvider& hashProvider);
31
40 [[nodiscard]] static Result<Value> commandLogValue(Battle& battle, Revision fromRevision);
41
51 [[nodiscard]] static Result<Battle::Commands> parseCommandLog(const Value& value, Revision snapshotRevision);
52};
53
54} // namespace eve::tactics
double value
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Versioned, integrity-checked persistence envelopes.
Deterministic accepted-command replay.
Deterministic board values and short-root ECS entities for tactics.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
Battle short-root and authoritative owner of board and turn state.
Stateless codec for the authoritative state of one battle.
std::function< Result< ContentId >(std::string_view canonicalInput)> SnapshotHashProvider
Injected content-digest implementation used by snapshots.
Definition Snapshot.h:36
Stable outer format shared by persistence and cross-process snapshots.
Definition Snapshot.h:46