载入中...
搜索中...
未找到
RTSAction.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
10#include "rts/RTSTypes.h"
11
12#include <memory>
13
14namespace eve::action {
15class ActionRuntime;
16}
17
18namespace eve::rts {
19
21enum class ActionDisposition : std::uint8_t {
22 Pending,
24};
25
30
39public:
41 virtual ~IRTSActionExecutor() = default;
42
51 const SimulationStep& step) = 0;
52};
53
62public:
64 explicit ActionAdapter(action::ActionRuntime& runtime);
66 ~ActionAdapter() override;
67
68 ActionAdapter(const ActionAdapter&) = delete;
70
73 [[nodiscard]] Result<ActionExecutionResult> execute(Unit& unit, const OrderRecord& order,
74 const SimulationStep& step) override;
76 void clear() noexcept;
77
78private:
79 struct Impl;
80 std::unique_ptr<Impl> impl_;
81};
82
83} // namespace eve::rts
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::vector< std::int32_t > order
RTS domain roots and composition-only components.
TacticalUnit * unit
float step
Definition TreeMesh.cpp:314
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Deterministic action lifecycle coordinator.
Definition Action.h:485
Adapter that maps RTS orders to the existing action::ActionRuntime.
Definition RTSAction.h:61
ActionAdapter & operator=(const ActionAdapter &)=delete
ActionAdapter(const ActionAdapter &)=delete
~ActionAdapter() override
Action adapter.
Interface isolating RTS orders from the shared action runtime.
Definition RTSAction.h:38
virtual Result< ActionExecutionResult > execute(Unit &unit, const OrderRecord &order, const SimulationStep &step)=0
Execute or advance one active RTS order.
virtual ~IRTSActionExecutor()=default
Releases IRTSActionExecutor resources.
RTS unit domain root.
Definition RTSTypes.h:495
ActionDisposition
Outcome of one RTS order-to-action adapter call.
Definition RTSAction.h:21
One deterministic fixed-step emitted by SimulationClock.
Definition Time.h:158
Owning, domain-local projection of an action adapter outcome.
Definition RTSAction.h:27
ActionDisposition disposition
Definition RTSAction.h:28
Owning projection of the active generic order used by RTS systems.
Definition RTSTypes.h:117