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

Autosave coordinator that never overwrites the formal document URI. 更多...

#include <EditorDiskDocumentStore.h>

Public 成员函数

 AutosaveService (IAtomicDocumentStore *store, std::string projectId)
 Create an autosave namespace.
 
Result< StoredDocument > writeDraft (const DocumentSnapshot &snapshot, const EditorValue &content)
 Write one revisioned draft under autosave://project/document.draft.
 
Result< AutosaveDraft > readDraft (const DocumentId &document) const
 Read a draft and validate its schema.
 
bool shouldOfferRecovery (const AutosaveDraft &draft, const DocumentSnapshot &formal) const
 True when a newer draft differs from the current formal disk base.
 
std::string draftUri (const DocumentId &document) const
 Return the stable draft URI for one document.
 

详细描述

Autosave coordinator that never overwrites the formal document URI.

在文件 EditorDiskDocumentStore.h 第 58 行定义.

构造及析构函数说明

◆ AutosaveService()

eve::editor::AutosaveService::AutosaveService ( IAtomicDocumentStore *  store,
std::string  projectId 
)
inline

Create an autosave namespace.

参数
storeNon-owning atomic store that outlives this service.
projectIdStable project identity used in draft URIs.

Store.

在文件 EditorDiskDocumentStore.h 第 65 行定义.

成员函数说明

◆ draftUri()

std::string eve::editor::AutosaveService::draftUri ( const DocumentId &  document) const

Return the stable draft URI for one document.

在文件 EditorDiskDocumentStore.cpp 第 166 行定义.

引用了 eve::UuidIdAdapter< Tag >::value().

被这些函数引用 readDraft() , 以及 writeDraft().

◆ readDraft()

◆ shouldOfferRecovery()

bool eve::editor::AutosaveService::shouldOfferRecovery ( const AutosaveDraft &  draft,
const DocumentSnapshot &  formal 
) const

◆ writeDraft()


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