Transaction boundary consumed by editor property and other UI models. 更多...
#include <EditorTransactionService.h>
Public 成员函数 | |
| virtual | ~IEditorTransactionBackend ()=default |
| Releases IEditorTransactionBackend resources. | |
| virtual Result< TransactionId > | begin (TransactionSpec specification)=0 |
| Begin an explicit transaction without mutating its target. | |
| virtual Result< void > | append (DomainOperation operation)=0 |
| Append a serializable operation to the pending transaction. | |
| virtual Result< EditorDryRunReport > | preview ()=0 |
| Validate the pending transaction without publishing target state. | |
| virtual Result< TransactionReceipt > | commit ()=0 |
| Publish the pending transaction and retain it for undo. | |
| virtual Result< void > | discard ()=0 |
| Discard pending work after reverting any provisional preview. | |
| virtual Result< TransactionReceipt > | retry ()=0 |
| Retry a failed commit while retaining its original operation list. | |
| virtual Result< TransactionReceipt > | undo ()=0 |
| Compensate the latest committed transaction. | |
| virtual Result< TransactionReceipt > | redo ()=0 |
| Reapply the latest compensated transaction. | |
| virtual bool | active () const noexcept=0 |
| Whether a transaction is currently pending. | |
| virtual bool | canUndo () const noexcept=0 |
| Whether committed history can be compensated. | |
| virtual bool | canRedo () const noexcept=0 |
| Whether compensated history can be reapplied. | |
详细描述
Transaction boundary consumed by editor property and other UI models.
Implementations are borrowed by the model and must outlive every synchronous call. The boundary owns the pending transaction and history; callers must inspect every structured result. Implementations are owner-thread-only and must not invoke an unknown callback while coordinating a transaction.
在文件 EditorTransactionService.h 第 17 行定义.
构造及析构函数说明
◆ ~IEditorTransactionBackend()
|
virtualdefault |
Releases IEditorTransactionBackend resources.
成员函数说明
◆ active()
|
pure virtualnoexcept |
Whether a transaction is currently pending.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::MaterialStudioController::beginInteraction(), eve::editor::EditorPropertyModel::beginTransaction(), eve::editor::EditorPropertyModel::refresh(), eve::editor::EditorPropertyModel::setTransactionBackend() , 以及 eve::editor::EditorPropertyModel::write().
◆ append()
|
pure virtual |
Append a serializable operation to the pending transaction.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::MaterialStudioController::commitInteraction() , 以及 eve::editor::EditorPropertyModel::write().
◆ begin()
|
pure virtual |
Begin an explicit transaction without mutating its target.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::EditorPropertyModel::beginTransaction(), eve::editor::MaterialStudioController::commitInteraction() , 以及 eve::editor::EditorPropertyModel::write().
◆ canRedo()
|
pure virtualnoexcept |
Whether compensated history can be reapplied.
◆ canUndo()
|
pure virtualnoexcept |
Whether committed history can be compensated.
◆ commit()
|
pure virtual |
Publish the pending transaction and retain it for undo.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::MaterialStudioController::commitInteraction(), eve::editor::EditorPropertyModel::commitTransaction() , 以及 eve::editor::EditorPropertyModel::write().
◆ discard()
|
pure virtual |
Discard pending work after reverting any provisional preview.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::MaterialStudioController::commitInteraction(), eve::editor::EditorPropertyModel::rollbackTransaction() , 以及 eve::editor::EditorPropertyModel::write().
◆ preview()
|
pure virtual |
Validate the pending transaction without publishing target state.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::MaterialStudioController::commitInteraction(), eve::editor::EditorPropertyModel::previewTransaction() , 以及 eve::editor::EditorPropertyModel::write().
◆ redo()
|
pure virtual |
Reapply the latest compensated transaction.
◆ retry()
|
pure virtual |
Retry a failed commit while retaining its original operation list.
在 eve::editor::LocalTransactionBackend 内被实现.
被这些函数引用 eve::editor::EditorPropertyModel::retryTransaction().
◆ undo()
|
pure virtual |
Compensate the latest committed transaction.
该类的文档由以下文件生成:
- src/modules/editor/EditorTransactionService.h