载入中...
搜索中...
未找到
ActionBlockRuntime.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8
9#include <map>
10#include <vector>
11
12namespace eve::action {
13
28public:
33 explicit ActionBlockRuntime(ActionNotifyRegistry& registry) noexcept : registry_(registry) {}
34
37
44 [[nodiscard]] Result<void> apply(const ActionAdvance& advance, ActionNotifyContext context);
45
51 [[nodiscard]] Result<void> interrupt(ActionNotifyContext context);
52
58 [[nodiscard]] Result<void> sample(const std::vector<ActionActiveBlock>& blocks,
60
62 [[nodiscard]] std::size_t executionCount() const noexcept { return active_.size(); }
63
64private:
65 ActionNotifyRegistry& registry_;
66 std::map<ActionExecutionId, std::vector<ActionActiveBlock>> active_;
67};
68
69} // namespace eve::action
Extensible notify descriptors, validation and runtime routing.
#define EVENGINE_API_PLATFORM
Definition Export.h:107
const eve::script::BindingContractRegistry & registry
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Owner-thread lifecycle router for timeline notifies and active blocks.
ActionBlockRuntime(ActionNotifyRegistry &registry) noexcept
Bind the canonical registry used for all synchronous callbacks.
ActionBlockRuntime(const ActionBlockRuntime &)=delete
ActionBlockRuntime & operator=(const ActionBlockRuntime &)=delete
std::size_t executionCount() const noexcept
Number of execution projections retained for interruption cleanup.
Canonical notify descriptor owner and runtime handler router.
Result payload for one deterministic advance call.
Definition Action.h:204
Context linking a routed event to its action execution.