Adapter that maps RTS orders to the existing action::ActionRuntime. 更多...
#include <RTSAction.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ActionAdapter (action::ActionRuntime &runtime) | |
| Bind the adapter to an owner-thread action runtime. | |
| ~ActionAdapter () override | |
| Action adapter. | |
| ActionAdapter (const ActionAdapter &)=delete | |
| ActionAdapter & | operator= (const ActionAdapter &)=delete |
| Result< ActionExecutionResult > | execute (Unit &unit, const OrderRecord &order, const SimulationStep &step) override |
| Execute or advance one active RTS order. | |
| void | clear () noexcept |
| Forget runtime execution correlations so restored orders are rebound on their next step. | |
Public 成员函数 继承自 eve::rts::IRTSActionExecutor | |
| virtual | ~IRTSActionExecutor ()=default |
| Releases IRTSActionExecutor resources. | |
详细描述
Adapter that maps RTS orders to the existing action::ActionRuntime.
ActionRuntime is borrowed and must outlive this adapter on the same owner thread. Pending executions are keyed by ECS generation plus order id, so slot reuse cannot resume the old action.
在文件 RTSAction.h 第 61 行定义.
构造及析构函数说明
◆ ActionAdapter() [1/2]
|
explicit |
Bind the adapter to an owner-thread action runtime.
在文件 RTSAction.cpp 第 44 行定义.
◆ ~ActionAdapter()
|
overridedefault |
Action adapter.
◆ ActionAdapter() [2/2]
|
delete |
成员函数说明
◆ clear()
|
noexcept |
Forget runtime execution correlations so restored orders are rebound on their next step.
在文件 RTSAction.cpp 第 48 行定义.
◆ execute()
|
overridevirtual |
Execute or advance one active RTS order.
- 参数
-
unit Unit whose order is being serviced; valid for this call only. order Owning projection of the current generic order. step Deterministic simulation step supplied by the caller.
- 返回
- Pending or Completed, or a structured provider failure.
Execute.
实现了 eve::rts::IRTSActionExecutor.
在文件 RTSAction.cpp 第 52 行定义.
引用了 eve::action::ActionRequest::actionId, eve::Applied, eve::action::Completed, eve::rts::Completed, eve::Diagnostic::error(), executionId, eve::Result< T >::failure(), eve::InvalidArgument, eve::InvariantViolation, eve::rts::Move, order, eve::Pending, pending, eve::rts::Pending, request, step, eve::Status::success(), eve::Result< T >::success() , 以及 unit.
◆ operator=()
|
delete |
该类的文档由以下文件生成:
- src/modules/rts/RTSAction.h
- src/modules/rts/RTSAction.cpp
Public 成员函数 继承自