载入中...
搜索中...
未找到
eve::rts::ActionAdapter类 参考final

Adapter that maps RTS orders to the existing action::ActionRuntime. 更多...

#include <RTSAction.h>

类 eve::rts::ActionAdapter 继承关系图:
eve::rts::IRTSActionExecutor

类

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]

eve::rts::ActionAdapter::ActionAdapter ( action::ActionRuntime &  runtime)
explicit

Bind the adapter to an owner-thread action runtime.

在文件 RTSAction.cpp 第 44 行定义.

◆ ~ActionAdapter()

eve::rts::ActionAdapter::~ActionAdapter ( )
overridedefault

Action adapter.

◆ ActionAdapter() [2/2]

eve::rts::ActionAdapter::ActionAdapter ( const ActionAdapter &  )
delete

成员函数说明

◆ clear()

void eve::rts::ActionAdapter::clear ( )
noexcept

Forget runtime execution correlations so restored orders are rebound on their next step.

在文件 RTSAction.cpp 第 48 行定义.

◆ execute()

Result< ActionExecutionResult > eve::rts::ActionAdapter::execute ( Unit &  unit,
const OrderRecord &  order,
const SimulationStep &  step 
)
overridevirtual

Execute or advance one active RTS order.

参数
unitUnit whose order is being serviced; valid for this call only.
orderOwning projection of the current generic order.
stepDeterministic 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=()

ActionAdapter & eve::rts::ActionAdapter::operator= ( const ActionAdapter &  )
delete

该类的文档由以下文件生成: