载入中...
搜索中...
未找到
EditorTargetCoordinator.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8
9#include <cstdint>
10#include <memory>
11#include <string>
12#include <vector>
13
14namespace eve::editor {
15
16class EditorSession;
17
26public:
31
34
36 [[nodiscard]] eve::editing::Result<void> registerPlannedCommand(
40 [[nodiscard]] eve::editing::Result<std::size_t> unregisterOwner(
41 const std::string& ownerModule) override;
43 [[nodiscard]] Result<void> registerTarget(IEditableTarget& target);
45 [[nodiscard]] Result<void> unregisterTarget(const TargetId& target);
47 [[nodiscard]] Result<void> bind(EditorSession& session, const TargetId& target);
49 [[nodiscard]] Result<EditorValue> inspect(const TargetId& target) const;
51 [[nodiscard]] Result<TransactionReceipt> undo(const TargetId& target);
53 [[nodiscard]] Result<TransactionReceipt> redo(const TargetId& target);
54
57 std::string id;
58 std::string type; // IEditableTarget::describe().type, when the target reports one
59 std::uint64_t revision = 0;
60 std::uint64_t generation = 0;
61 };
62
72 [[nodiscard]] std::vector<TargetSummary> targets() const;
73
74private:
75 friend class EditorSession;
76 void detach(EditorSession& session) noexcept;
77
78 struct Impl;
79 std::unique_ptr<Impl> impl_;
80};
81
82} // namespace eve::editor
LogicalId target
std::string descriptor
#define EVENGINE_API_ORCHESTRATION
Definition Export.h:111
std::uint64_t revision
std::uint32_t generation
std::optional< InteractionSession > session
Definition Tactics.cpp:39
std::vector< VegetationPresetCommand > commands
Move-only operation result carrying either a value or Status.
Definition Result.h:155
UUID-backed identifier adapter for legacy textual boundaries.
Definition Identity.h:314
IEditableTarget public API.
Lower-layer registration boundary implemented by an editor or runtime editing host.
Registry and execution gate for UI-, script- and automation-neutral commands.
Hosts interchangeable editor tools and routes their lifecycle/input.
Coordinates editable targets, per-target histories and domain commands.
EditorTargetCoordinator(const EditorTargetCoordinator &)=delete
EditorTargetCoordinator & operator=(const EditorTargetCoordinator &)=delete
std::function< Result< CommandPlan >(IEditableTarget &, const CommandRequest &)> EditingCommandPlanner
Side-effect-free planner invoked with the resolved target.
Domain-owned metadata for one planned editing command.
Discovery metadata for one registered editable target.