Borrow an RPGSaveSession as one atomic game-save participant. 更多...
#include <RPGGameSaveParticipant.h>
Public 成员函数 | |
| RPGGameSaveParticipant (RPGSaveSession &session) noexcept | |
| The bound session must outlive this adapter and any game-save transaction. | |
| 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 |
Public 成员函数 继承自 eve::IGameSaveParticipant | |
| virtual | ~IGameSaveParticipant ()=default |
| virtual Result< std::unique_ptr< IPreparedGameRestore > > | prepare (const Value &state)=0 |
| Validate and prepare a no-fail commit without changing live state. | |
详细描述
Borrow an RPGSaveSession as one atomic game-save participant.
在文件 RPGGameSaveParticipant.h 第 10 行定义.
构造及析构函数说明
◆ RPGGameSaveParticipant()
|
explicitnoexcept |
The bound session must outlive this adapter and any game-save transaction.
在文件 RPGGameSaveParticipant.cpp 第 23 行定义.
成员函数说明
◆ capture()
Capture an independent owning snapshot of this domain.
实现了 eve::IGameSaveParticipant.
在文件 RPGGameSaveParticipant.cpp 第 27 行定义.
引用了 eve::Result< T >::failure(), eve::Value::fromJson() , 以及 eve::rpg::RPGSaveSession::snapshotJson().
◆ prepare()
|
override |
在文件 RPGGameSaveParticipant.cpp 第 33 行定义.
引用了 eve::rpg::RPGSaveSession::prepareRestoreSnapshotJson(), result , 以及 state.
◆ saveKey()
|
overridevirtualnoexcept |
Stable unique participant key within the game-save schema.
实现了 eve::IGameSaveParticipant.
在文件 RPGGameSaveParticipant.cpp 第 25 行定义.
该类的文档由以下文件生成:
- src/modules/rpg/RPGGameSaveParticipant.h
- src/modules/rpg/RPGGameSaveParticipant.cpp
Public 成员函数 继承自