Local transaction coordinator backed by an injected edit authority. 更多...
#include <EditorTransactionService.h>
Public 成员函数 | |
| LocalTransactionBackend (IEditAuthority *authority=nullptr) | |
| Bind a non-owning authority that outlives this backend. | |
| Result< void > | setAuthority (IEditAuthority *authority) |
| Change the non-owning authority when no transaction is active. | |
| Result< TransactionId > | begin (TransactionSpec specification) override |
| Begin a transaction with a stable id and base revision. | |
| Result< void > | append (DomainOperation operation) override |
| Append an operation to the active transaction without applying it. | |
| Result< EditorDryRunReport > | preview () override |
| Preflight the active operation list without mutating target state. | |
| Result< TransactionReceipt > | commit () override |
| Preflight and commit all active operations through the authority. | |
| Result< void > | discard () override |
| Discard the active, not-yet-committed operation list. | |
| Result< void > | rollback () |
| Compatibility spelling for discard. | |
| Result< TransactionReceipt > | retry () override |
| Retry the retained failed commit. | |
| Result< TransactionReceipt > | undo () override |
| Compensate the most recent committed transaction. | |
| Result< TransactionReceipt > | redo () override |
| Reapply the most recently compensated transaction. | |
| bool | active () const noexcept override |
| True while begin/append has an uncommitted transaction. | |
| bool | canUndo () const noexcept override |
| True when one or more committed transactions can be compensated. | |
| bool | canRedo () const noexcept override |
| True when one or more compensated transactions can be reapplied. | |
| void | clear () |
| Clear pending work and local undo/redo history without mutating the authority target. | |
Public 成员函数 继承自 eve::editor::IEditorTransactionBackend | |
| virtual | ~IEditorTransactionBackend ()=default |
| Releases IEditorTransactionBackend resources. | |
详细描述
Local transaction coordinator backed by an injected edit authority.
在文件 EditorTransactionService.h 第 48 行定义.
构造及析构函数说明
◆ LocalTransactionBackend()
|
inlineexplicit |
Bind a non-owning authority that outlives this backend.
在文件 EditorTransactionService.h 第 51 行定义.
成员函数说明
◆ active()
|
inlineoverridevirtualnoexcept |
True while begin/append has an uncommitted transaction.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.h 第 75 行定义.
被这些函数引用 eve::editor::ActionTimelineEditor::reloadDocument().
◆ append()
|
overridevirtual |
Append an operation to the active transaction without applying it.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 68 行定义.
引用了 eve::editor::EditorTransactionConsumer::append() , 以及 operation.
被这些函数引用 eve::editor::EditorTargetCoordinator::Impl::execute() , 以及 eve::audio_editor::AudioSourceEditor::setProperty().
◆ begin()
|
overridevirtual |
Begin a transaction with a stable id and base revision.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 60 行定义.
引用了 eve::editor::EditorTransactionConsumer::begin(), eve::UuidIdAdapter< Tag >::empty(), eve::editing::TransactionSpec::id , 以及 eve::editing::TransactionSpec::target.
被这些函数引用 eve::editor::EditorTargetCoordinator::Impl::execute() , 以及 eve::audio_editor::AudioSourceEditor::setProperty().
◆ canRedo()
|
inlineoverridevirtualnoexcept |
True when one or more compensated transactions can be reapplied.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.h 第 79 行定义.
◆ canUndo()
|
inlineoverridevirtualnoexcept |
True when one or more committed transactions can be compensated.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.h 第 77 行定义.
◆ clear()
|
inline |
Clear pending work and local undo/redo history without mutating the authority target.
在文件 EditorTransactionService.h 第 81 行定义.
被这些函数引用 eve::editor::ActionTimelineEditor::reloadDocument().
◆ commit()
|
overridevirtual |
Preflight and commit all active operations through the authority.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 74 行定义.
引用了 eve::editor::EditorTransactionConsumer::commit().
被这些函数引用 eve::editor::EditorTargetCoordinator::Impl::execute() , 以及 eve::audio_editor::AudioSourceEditor::setProperty().
◆ discard()
|
overridevirtual |
Discard the active, not-yet-committed operation list.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 76 行定义.
引用了 eve::editor::EditorTransactionConsumer::discard().
被这些函数引用 eve::editor::EditorTargetCoordinator::Impl::execute() , 以及 rollback().
◆ preview()
|
overridevirtual |
Preflight the active operation list without mutating target state.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 72 行定义.
◆ redo()
|
overridevirtual |
Reapply the most recently compensated transaction.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 84 行定义.
引用了 eve::editor::EditorTransactionConsumer::redo().
被这些函数引用 eve::animation_editor::AnimationClipEditor::redo(), eve::audio_editor::AudioSourceEditor::redo(), eve::avatar_editor::AvatarDocumentEditor::redo(), eve::biome_editor::BiomeRulesEditor::redo(), eve::procgen_editor::ProcgenScriptEditor::redo(), eve::ui_editor::UiThemeEditor::redo(), eve::voxel_editor::VoxelCatalogEditor::redo() , 以及 eve::editor::EditorTargetCoordinator::redo().
◆ retry()
|
overridevirtual |
Retry the retained failed commit.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 80 行定义.
◆ rollback()
| Result< void > eve::editor::LocalTransactionBackend::rollback | ( | ) |
Compatibility spelling for discard.
在文件 EditorTransactionService.cpp 第 78 行定义.
引用了 discard().
被这些函数引用 eve::audio_editor::AudioSourceEditor::setProperty().
◆ setAuthority()
| Result< void > eve::editor::LocalTransactionBackend::setAuthority | ( | IEditAuthority * | authority | ) |
Change the non-owning authority when no transaction is active.
在文件 EditorTransactionService.cpp 第 56 行定义.
◆ undo()
|
overridevirtual |
Compensate the most recent committed transaction.
实现了 eve::editor::IEditorTransactionBackend.
在文件 EditorTransactionService.cpp 第 82 行定义.
引用了 eve::editor::EditorTransactionConsumer::undo().
被这些函数引用 eve::animation_editor::AnimationClipEditor::undo(), eve::audio_editor::AudioSourceEditor::undo(), eve::avatar_editor::AvatarDocumentEditor::undo(), eve::biome_editor::BiomeRulesEditor::undo(), eve::procgen_editor::ProcgenScriptEditor::undo(), eve::ui_editor::UiThemeEditor::undo(), eve::voxel_editor::VoxelCatalogEditor::undo() , 以及 eve::editor::EditorTargetCoordinator::undo().
该类的文档由以下文件生成:
- src/modules/editor/EditorTransactionService.h
- src/modules/editor/EditorTransactionService.cpp
Public 成员函数 继承自