Composition runtime that discovers EditorPackage providers and installs them. 更多...
#include <EditorHost.h>
类 | |
| struct | Options |
Public 成员函数 | |
| EditorHost (Editor &editor, Options options) | |
| Create a host bound to an Editor module's command service. | |
| ~EditorHost () | |
| Destroy host, detach MCP projection if attached, and unmount packages. | |
| EditorHost (const EditorHost &)=delete | |
| EditorHost & | operator= (const EditorHost &)=delete |
| Result< EditorHostMountReport > | autoMount () |
| Discover every IEditorPackageProvider and mount complete packages. | |
| Result< EditorHostMountReport > | mount (const std::vector< std::string > &owners={}, const std::unordered_map< std::string, EditorHostMountOverride > &overrides={}) |
| Mount an explicit owner allowlist. | |
| Result< void > | unmount (std::string_view ownerModule) |
| Unmount one owner and remove its workspace panels. | |
| void | unmountAll () |
| Unmount every mounted package. | |
| EditorWorkspace & | workspace () |
| Workspace receiving merged panels. | |
| const EditorWorkspace & | workspace () const |
| Workspace receiving merged panels. | |
| const std::string & | selectionChannel () const |
| Host selection channel used by SelectionRouter. | |
| EditorSelectionRouter & | selection () |
| Default selection → inspector router. | |
| const EditorSelectionRouter & | selection () const |
| Default selection → inspector router. | |
| EditorUndoCoordinator & | undo () |
| Focus-aware undo coordinator. | |
| const EditorUndoCoordinator & | undo () const |
| Focus-aware undo coordinator. | |
| Result< void > | exportMcp (EditorMcpExportMode mode=EditorMcpExportMode::Commands) |
| Attach this host as the active Mode A MCP projection scope. | |
| Result< EditorValue > | exportCommandCatalog () const |
| Export mounted command catalog (id + inputSchema) for tests/MCP. | |
| Result< EditorValue > | exportTargetCatalog () const |
| Export discovered target types with createSchema when known. | |
| Result< EditorValue > | auditPackages () const |
| Completeness audit (incomplete packages + orphan factory types). | |
| bool | isMounted (std::string_view ownerModule) const |
| True when owner is currently mounted. | |
| std::vector< std::string > | mountedOwnerNames () const |
| Mounted package owner names. @cost Linear in mounted package count; returns an owning vector copy. | |
| std::vector< std::string > | mountedTargetTypeNames () const |
| Target types contributed by mounted packages. @cost Linear in mounted target types; returns a sorted owning vector copy. | |
| editing::EditorUndoPolicy | mountedUndoPolicy (std::string_view ownerModule) const |
| Undo policy recorded for a mounted owner (Share when unknown). | |
详细描述
Composition runtime that discovers EditorPackage providers and installs them.
Owns a workspace and tracks mounted owners for unmount cleanup. Does not own domain document contents.
在文件 EditorHost.h 第 53 行定义.
构造及析构函数说明
◆ EditorHost() [1/2]
Create a host bound to an Editor module's command service.
在文件 EditorHost.cpp 第 23 行定义.
引用了 eve::editor::HostProfile::allowsAllCommands(), eve::editor::HostProfile::developer(), eve::editor::HostProfile::kind() , 以及 eve::editor::EditorHost::Options::profile.
◆ ~EditorHost()
| eve::editor::EditorHost::~EditorHost | ( | ) |
Destroy host, detach MCP projection if attached, and unmount packages.
在文件 EditorHost.cpp 第 36 行定义.
引用了 eve::editor::EditorMcpProjector::detach(), eve::editor::editorMcpProjector(), host , 以及 unmountAll().
◆ EditorHost() [2/2]
|
delete |
成员函数说明
◆ auditPackages()
| Result< EditorValue > eve::editor::EditorHost::auditPackages | ( | ) | const |
Completeness audit (incomplete packages + orphan factory types).
在文件 EditorHost.cpp 第 126 行定义.
引用了 eve::editor::EditorMcpProjector::auditCompleteness() , 以及 eve::editor::editorMcpProjector().
◆ autoMount()
| Result< EditorHostMountReport > eve::editor::EditorHost::autoMount | ( | ) |
Discover every IEditorPackageProvider and mount complete packages.
在文件 EditorHost.cpp 第 41 行定义.
引用了 mount().
◆ exportCommandCatalog()
| Result< EditorValue > eve::editor::EditorHost::exportCommandCatalog | ( | ) | const |
Export mounted command catalog (id + inputSchema) for tests/MCP.
在文件 EditorHost.cpp 第 186 行定义.
引用了 commands, eve::editor::EditorCommandService::commands(), filter, kind, mountedOwnerNames(), eve::editor::EditorHost::Options::profile , 以及 eve::editing::propertySchemaToJsonSchema().
◆ exportMcp()
| Result< void > eve::editor::EditorHost::exportMcp | ( | EditorMcpExportMode | mode = EditorMcpExportMode::Commands | ) |
Attach this host as the active Mode A MCP projection scope.
在文件 EditorHost.cpp 第 124 行定义.
引用了 eve::editor::EditorMcpProjector::attach() , 以及 eve::editor::editorMcpProjector().
◆ exportTargetCatalog()
| Result< EditorValue > eve::editor::EditorHost::exportTargetCatalog | ( | ) | const |
Export discovered target types with createSchema when known.
在文件 EditorHost.cpp 第 215 行定义.
引用了 filter, found, left, mountedTargetTypeNames(), eve::editing::propertySchemaToJsonSchema(), right, target, type , 以及 eve::editor::IEditorAutomationTargetFactory::types().
◆ isMounted()
| bool eve::editor::EditorHost::isMounted | ( | std::string_view | ownerModule | ) | const |
True when owner is currently mounted.
在文件 EditorHost.cpp 第 99 行定义.
◆ mount()
| Result< EditorHostMountReport > eve::editor::EditorHost::mount | ( | const std::vector< std::string > & | owners = {}, |
| const std::unordered_map< std::string, EditorHostMountOverride > & | overrides = {} |
||
| ) |
Mount an explicit owner allowlist.
- 参数
-
owners Module owner names (e.g. "action_editor"). Empty means all discovered.
在文件 EditorHost.cpp 第 43 行定义.
引用了 eve::editor::EditorHostMountReport::entries, found, eve::editor::EditorHostMountReport::mountedPackages, eve::editor::EditorHostMountEntry::ownerModule, provider, eve::editor::EditorHostMountEntry::skipped , 以及 eve::editor::EditorHostMountEntry::skipReason.
被这些函数引用 autoMount().
◆ mountedOwnerNames()
| std::vector< std::string > eve::editor::EditorHost::mountedOwnerNames | ( | ) | const |
Mounted package owner names. @cost Linear in mounted package count; returns an owning vector copy.
在文件 EditorHost.cpp 第 101 行定义.
引用了 owner.
被这些函数引用 exportCommandCatalog() , 以及 eve::editor::EditorMcpProjector::mountedOwners().
◆ mountedTargetTypeNames()
| std::vector< std::string > eve::editor::EditorHost::mountedTargetTypeNames | ( | ) | const |
Target types contributed by mounted packages. @cost Linear in mounted target types; returns a sorted owning vector copy.
在文件 EditorHost.cpp 第 109 行定义.
引用了 target.
被这些函数引用 exportTargetCatalog() , 以及 eve::editor::EditorMcpProjector::mountedTargetTypes().
◆ mountedUndoPolicy()
| editing::EditorUndoPolicy eve::editor::EditorHost::mountedUndoPolicy | ( | std::string_view | ownerModule | ) | const |
Undo policy recorded for a mounted owner (Share when unknown).
在文件 EditorHost.cpp 第 118 行定义.
引用了 found , 以及 eve::editing::Share.
被这些函数引用 eve::editor::EditorUndoCoordinator::focusedPolicy().
◆ operator=()
|
delete |
◆ selection() [1/2]
|
inline |
Default selection → inspector router.
在文件 EditorHost.h 第 97 行定义.
◆ selection() [2/2]
|
inline |
Default selection → inspector router.
在文件 EditorHost.h 第 99 行定义.
◆ selectionChannel()
|
inline |
Host selection channel used by SelectionRouter.
在文件 EditorHost.h 第 94 行定义.
◆ undo() [1/2]
|
inline |
Focus-aware undo coordinator.
在文件 EditorHost.h 第 102 行定义.
◆ undo() [2/2]
|
inline |
Focus-aware undo coordinator.
在文件 EditorHost.h 第 104 行定义.
◆ unmount()
| Result< void > eve::editor::EditorHost::unmount | ( | std::string_view | ownerModule | ) |
Unmount one owner and remove its workspace panels.
在文件 EditorHost.cpp 第 76 行定义.
引用了 found, eve::editing::noOp() , 以及 eve::editor::EditorWorkspace::removePanel().
被这些函数引用 unmountAll().
◆ unmountAll()
| void eve::editor::EditorHost::unmountAll | ( | ) |
Unmount every mounted package.
在文件 EditorHost.cpp 第 88 行定义.
引用了 eve::Result< void >::ignore(), owner, unmount() , 以及 values.
被这些函数引用 ~EditorHost().
◆ workspace() [1/2]
|
inline |
Workspace receiving merged panels.
在文件 EditorHost.h 第 89 行定义.
被这些函数引用 eve::editor::EditorMcpProjector::auditCompleteness(), eve::editor::EditorSelectionRouter::clear() , 以及 eve::editor::EditorSelectionRouter::select().
◆ workspace() [2/2]
|
inline |
Workspace receiving merged panels.
在文件 EditorHost.h 第 91 行定义.
该类的文档由以下文件生成:
- src/modules/editor/EditorHost.h
- src/modules/editor/EditorHost.cpp