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

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(), source , 以及 state.

◆ cancel()

void eve::editor::WorkspacePresentation::cancel ( )
noexcept

Cancel the draft without changing the domain or history.

在文件 WorkspacePresentation.cpp 第 55 行定义.

被这些函数引用 action(), commit() , 以及 stage().

◆ 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 
)

Validate and commit one discrete keyboard/checkbox edit.

在文件 WorkspacePresentation.cpp 第 57 行定义.

引用了 commit(), path, source, stage() , 以及 value.

◆ hasDraft()

bool eve::editor::WorkspacePresentation::hasDraft ( ) const
inlinenoexcept

Whether an uncommitted draft exists.

在文件 WorkspacePresentation.h 第 62 行定义.

◆ snapshot()

Value eve::editor::WorkspacePresentation::snapshot ( const IWorkspacePresentationSource &  source) const

Immutable current schema/value projection, including any local draft.

在文件 WorkspacePresentation.cpp 第 71 行定义.

引用了 choices, current, descriptor, kind, rows, source, state, text , 以及 value.

◆ stage()

Result< void > eve::editor::WorkspacePresentation::stage ( IWorkspacePresentationSource &  source,
PropertyPath  path,
EditorValue  value 
)

Stage an owning draft; repeated updates create no document/history mutation.

在文件 WorkspacePresentation.cpp 第 10 行定义.

引用了 cancel(), current, descriptor, path, source, state, valid , 以及 value.

被这些函数引用 edit().


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