载入中...
搜索中...
未找到
ActionBlockRuntime.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8
9#include <map>
10#include <vector>
11
12namespace eve::action {
13
24public:
29 explicit ActionBlockRuntime(ActionNotifyRegistry& registry) noexcept : registry_(registry) {}
30
33
40 [[nodiscard]] Result<void> apply(const ActionAdvance& advance, ActionNotifyContext context);
41
47 [[nodiscard]] Result<void> interrupt(ActionNotifyContext context);
48
54 [[nodiscard]] Result<void> sample(const std::vector<ActionActiveBlock>& blocks,
56
58 [[nodiscard]] std::size_t executionCount() const noexcept { return active_.size(); }
59
60private:
61 ActionNotifyRegistry& registry_;
62 std::map<ActionExecutionId, std::vector<ActionActiveBlock>> active_;
63};
64
65} // namespace eve::action
Extensible notify descriptors, validation and runtime routing.
#define EVENGINE_API_PLATFORM
Definition Export.h:107
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:155
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:175
Context linking a routed event to its action execution.