Maps the same editor transaction output to a document URI or save slot. 更多...
#include <EditorPersistence.h>
Public 成员函数 | |
| EditorPersistenceAdapter (EditorPersistenceKind kind, IAtomicDocumentStore *store, std::string resourceUri) | |
| Bind one logical persistence target. | |
| Result< EditorPersistenceSnapshot > | load () const |
| Load the last committed checkpoint and journal. | |
| Result< EditorPersistenceSnapshot > | commit (const EditorPersistenceSnapshot &base, EditorValue content, std::vector< DomainOperation > journal) |
| Atomically commit a checkpoint against its loaded revision/hash. | |
详细描述
Maps the same editor transaction output to a document URI or save slot.
The injected atomic store is the only backend-specific piece: projects may use DiskAtomicDocumentStore for scene documents and adapt their game save service to IAtomicDocumentStore for savegame slots.
在文件 EditorPersistence.h 第 29 行定义.
构造及析构函数说明
◆ EditorPersistenceAdapter()
|
inline |
Bind one logical persistence target.
- 参数
-
kind Scene document or savegame semantics. store Non-owning atomic backend that outlives this adapter. resourceUri Backend-specific stable resource identity.
Kind.
在文件 EditorPersistence.h 第 37 行定义.
成员函数说明
◆ commit()
| Result< EditorPersistenceSnapshot > eve::editor::EditorPersistenceAdapter::commit | ( | const EditorPersistenceSnapshot & | base, |
| EditorValue | content, | ||
| std::vector< DomainOperation > | journal | ||
| ) |
Atomically commit a checkpoint against its loaded revision/hash.
在文件 EditorPersistence.cpp 第 63 行定义.
引用了 eve::editor::IAtomicDocumentStore::compareAndSwap(), eve::editor::EditorPersistenceSnapshot::contentHash, eve::Result< T >::failure(), eve::editor::EditorPersistenceSnapshot::kind, operation, eve::editor::EditorPersistenceSnapshot::revision , 以及 stored.
◆ load()
| Result< EditorPersistenceSnapshot > eve::editor::EditorPersistenceAdapter::load | ( | ) | const |
Load the last committed checkpoint and journal.
在文件 EditorPersistence.cpp 第 47 行定义.
引用了 eve::Result< T >::failure(), eve::editor::EditorPersistenceSnapshot::kind, eve::editor::IAtomicDocumentStore::read() , 以及 stored.
该类的文档由以下文件生成:
- src/modules/editor/EditorPersistence.h
- src/modules/editor/EditorPersistence.cpp