载入中...
搜索中...
未找到
eve::editor::EditorPersistenceAdapter类 参考

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()

eve::editor::EditorPersistenceAdapter::EditorPersistenceAdapter ( EditorPersistenceKind  kind,
IAtomicDocumentStore *  store,
std::string  resourceUri 
)
inline

Bind one logical persistence target.

参数
kindScene document or savegame semantics.
storeNon-owning atomic backend that outlives this adapter.
resourceUriBackend-specific stable resource identity.

Kind.

在文件 EditorPersistence.h 第 37 行定义.

成员函数说明

◆ commit()

Result< EditorPersistenceSnapshot > eve::editor::EditorPersistenceAdapter::commit ( const EditorPersistenceSnapshot &  base,
EditorValue  content,
std::vector< DomainOperation >  journal 
)

◆ 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.


该类的文档由以下文件生成: