Borrow one authoritative battle as a game-save participant. 更多...
#include <TacticsGameSaveParticipant.h>
Public 成员函数 | |
| TacticsGameSaveParticipant (Battle &battle, SnapshotHashProvider hashProvider) | |
| Battle and digest contract must remain stable for this adapter's lifetime. | |
| std::string_view | saveKey () const noexcept override |
| Stable unique participant key within the game-save schema. | |
| Result< Value > | capture () const override |
| Capture an independent owning snapshot of this domain. | |
| Result< std::unique_ptr< IPreparedGameRestore > > | prepare (const Value &state) override |
| Validate and prepare a no-fail commit without changing live state. | |
Public 成员函数 继承自 eve::IGameSaveParticipant | |
| virtual | ~IGameSaveParticipant ()=default |
详细描述
Borrow one authoritative battle as a game-save participant.
在文件 TacticsGameSaveParticipant.h 第 10 行定义.
构造及析构函数说明
◆ TacticsGameSaveParticipant()
| eve::tactics::TacticsGameSaveParticipant::TacticsGameSaveParticipant | ( | Battle & | battle, |
| SnapshotHashProvider | hashProvider | ||
| ) |
Battle and digest contract must remain stable for this adapter's lifetime.
在文件 TacticsGameSaveParticipant.cpp 第 22 行定义.
成员函数说明
◆ capture()
Capture an independent owning snapshot of this domain.
实现了 eve::IGameSaveParticipant.
在文件 TacticsGameSaveParticipant.cpp 第 27 行定义.
引用了 eve::Result< T >::failure(), snapshot, eve::tactics::TacticsPersistence::snapshot() , 以及 eve::snapshotEnvelopeValue().
◆ prepare()
|
overridevirtual |
Validate and prepare a no-fail commit without changing live state.
实现了 eve::IGameSaveParticipant.
在文件 TacticsGameSaveParticipant.cpp 第 33 行定义.
引用了 eve::parseSnapshotEnvelopeValue(), eve::tactics::TacticsPersistence::prepareRestore(), result, snapshot , 以及 state.
◆ saveKey()
|
overridevirtualnoexcept |
Stable unique participant key within the game-save schema.
实现了 eve::IGameSaveParticipant.
在文件 TacticsGameSaveParticipant.cpp 第 25 行定义.
该类的文档由以下文件生成:
- src/modules/tactics/TacticsGameSaveParticipant.h
- src/modules/tactics/TacticsGameSaveParticipant.cpp
Public 成员函数 继承自