Compare-and-swap persistence boundary used by DocumentService. 更多...
#include <EditorDocumentService.h>
Public 成员函数 | |
| virtual | ~IAtomicDocumentStore ()=default |
| Releases IAtomicDocumentStore resources. | |
| virtual Result< StoredDocument > | read (const std::string &resourceUri) const =0 |
| Read the latest value for a resource URI. | |
| virtual Result< StoredDocument > | compareAndSwap (const std::string &resourceUri, Revision expectedRevision, const std::string &expectedContentHash, const EditorValue &content)=0 |
| Replace a value only when the expected disk revision still matches. | |
详细描述
Compare-and-swap persistence boundary used by DocumentService.
在文件 EditorDocumentService.h 第 85 行定义.
构造及析构函数说明
◆ ~IAtomicDocumentStore()
|
virtualdefault |
Releases IAtomicDocumentStore resources.
成员函数说明
◆ compareAndSwap()
|
pure virtual |
Replace a value only when the expected disk revision still matches.
在 eve::editor::DiskAtomicDocumentStore , 以及 eve::editor::MemoryAtomicDocumentStore 内被实现.
被这些函数引用 eve::editor::EditorPersistenceAdapter::commit(), eve::editor::DocumentService::executeSave() , 以及 eve::editor::AutosaveService::writeDraft().
◆ read()
|
pure virtual |
Read the latest value for a resource URI.
在 eve::editor::DiskAtomicDocumentStore , 以及 eve::editor::MemoryAtomicDocumentStore 内被实现.
被这些函数引用 eve::editor::EditorPersistenceAdapter::load(), eve::editor::DocumentService::open(), eve::editor::AutosaveService::readDraft(), eve::editor::DocumentService::reconcileExternal() , 以及 eve::editor::AutosaveService::writeDraft().
该类的文档由以下文件生成:
- src/modules/editor/EditorDocumentService.h