载入中...
搜索中...
未找到
EditingCommandRegistry.h
浏览该文件的文档.
1#pragma once
2
5
6#include <cstddef>
7#include <functional>
8#include <string>
9#include <vector>
10
11namespace eve::editing {
12
16 std::string ownerModule;
17 std::string displayName;
18 std::string category;
19 bool automationAllowed = true;
21 std::vector<std::string> targetKinds;
28 std::string panelCapability;
30 std::string panelContext;
31};
32
35 std::function<Result<CommandPlan>(IEditableTarget&, const CommandRequest&)>;
36
44public:
45 static constexpr const char* capabilityName = "IEditingCommandRegistry";
46
48 virtual ~IEditingCommandRegistry() = default;
50 [[nodiscard]] virtual Result<void> registerPlannedCommand(
57 [[nodiscard]] virtual Result<std::size_t> unregisterOwner(const std::string& ownerModule) = 0;
58};
59
60} // namespace eve::editing
std::string descriptor
Move-only operation result carrying either a value or Status.
Definition Result.h:176
UUID-backed identifier adapter for legacy textual boundaries.
Definition Identity.h:313
IEditableTarget public API.
Lower-layer registration boundary implemented by an editor or runtime editing host.
static constexpr const char * capabilityName
virtual ~IEditingCommandRegistry()=default
Releases IEditingCommandRegistry resources.
virtual Result< void > registerPlannedCommand(EditingCommandDescriptor descriptor, EditingCommandPlanner planner)=0
Register or replace one domain-owned planned command.
virtual Result< std::size_t > unregisterOwner(const std::string &ownerModule)=0
Remove every command registered by one domain module.
std::function< Result< CommandPlan >(IEditableTarget &, const CommandRequest &)> EditingCommandPlanner
Side-effect-free planner invoked with the resolved target.
CommandRequest public API.
Domain-owned metadata for one planned editing command.
std::string panelContext
Workspace panel context slot (list/preview/inspector/timeline/…).
std::string panelCapability
Workspace panel capability this command is bound to (panel-before-automation).
std::vector< std::string > targetKinds
Target type names this command may bind (e.g. action-timeline).
PropertySchema payloadSchema
Payload shape shared by Inspector forms and MCP inputSchema.
EVENGINE_API_PLATFORM public API.