Shared validation and draft/commit controller used by domain editor UI adapters. @ownership Owns only a temporary draft. Never owns a document, selection or undo stack. @lifetime One controller belongs to one domain instance; cancel before switching sources. @thread Owner thread only. No callbacks or retained source pointers. @reentrancy Non-reentrant; host dispatches sequentially and closes at a safe point. 更多...
#include <WorkspacePresentation.h>
Public 成员函数 | |
| Result< void > | stage (IWorkspacePresentationSource &source, PropertyPath path, EditorValue value) |
| Stage an owning draft; repeated updates create no document/history mutation. | |
| Result< void > | commit (IWorkspacePresentationSource &source) |
| Commit the draft once; rejects revision or selection changes and consumes the draft. | |
| void | cancel () noexcept |
| Cancel the draft without changing the domain or history. | |
| Result< void > | edit (IWorkspacePresentationSource &source, PropertyPath path, EditorValue value) |
| Validate and commit one discrete keyboard/checkbox edit. | |
| Result< void > | action (IWorkspacePresentationSource &source, std::string_view id) |
| Route an action through the domain backend; pending drafts are cancelled first. | |
| bool | hasDraft () const noexcept |
| Whether an uncommitted draft exists. | |
| Value | snapshot (const IWorkspacePresentationSource &source) const |
| Immutable current schema/value projection, including any local draft. | |
详细描述
Shared validation and draft/commit controller used by domain editor UI adapters. @ownership Owns only a temporary draft. Never owns a document, selection or undo stack. @lifetime One controller belongs to one domain instance; cancel before switching sources. @thread Owner thread only. No callbacks or retained source pointers. @reentrancy Non-reentrant; host dispatches sequentially and closes at a safe point.
在文件 WorkspacePresentation.h 第 49 行定义.
成员函数说明
◆ action()
| Result< void > eve::editor::WorkspacePresentation::action | ( | IWorkspacePresentationSource & | source, |
| std::string_view | id | ||
| ) |
Route an action through the domain backend; pending drafts are cancelled first.
在文件 WorkspacePresentation.cpp 第 63 行定义.
◆ cancel()
|
noexcept |
Cancel the draft without changing the domain or history.
在文件 WorkspacePresentation.cpp 第 55 行定义.
◆ commit()
| Result< void > eve::editor::WorkspacePresentation::commit | ( | IWorkspacePresentationSource & | source | ) |
Commit the draft once; rejects revision or selection changes and consumes the draft.
在文件 WorkspacePresentation.cpp 第 39 行定义.
引用了 cancel(), descriptor, draft, eve::editing::noOp(), source, state , 以及 valid.
被这些函数引用 edit().
◆ edit()
| Result< void > eve::editor::WorkspacePresentation::edit | ( | IWorkspacePresentationSource & | source, |
| PropertyPath | path, | ||
| EditorValue | value | ||
| ) |
◆ hasDraft()
|
inlinenoexcept |
Whether an uncommitted draft exists.
在文件 WorkspacePresentation.h 第 62 行定义.
◆ snapshot()
| Value eve::editor::WorkspacePresentation::snapshot | ( | const IWorkspacePresentationSource & | source | ) | const |
◆ stage()
| Result< void > eve::editor::WorkspacePresentation::stage | ( | IWorkspacePresentationSource & | source, |
| PropertyPath | path, | ||
| EditorValue | value | ||
| ) |
该类的文档由以下文件生成:
- src/modules/editor/presentation/WorkspacePresentation.h
- src/modules/editor/presentation/WorkspacePresentation.cpp