载入中...
搜索中...
未找到
eve::action::ActionRuntime类 参考

Deterministic action lifecycle coordinator. 更多...

#include <Action.h>

Public 成员函数

 ActionRuntime (ActionServices services={})
 Bind borrowed composition ports to this owner-thread runtime.
 
 ActionRuntime (const ActionRuntime &)=delete
 
ActionRuntime & operator= (const ActionRuntime &)=delete
 
 ActionRuntime (ActionRuntime &&)=delete
 
ActionRuntime & operator= (ActionRuntime &&)=delete
 
 ~ActionRuntime ()=default
 Action runtime.
 
Result< ActionExecutionId > submit (ActionDefinition definition, ActionRequest request)
 Submit a validated definition/request pair in Requested phase.
 
Result< ActionAdvance > advance (ActionExecutionId id, SimulationTick tick, Duration delta)
 Advance one execution by an injected simulation duration.
 
Result< void > cancel (ActionExecutionId id, SimulationTick tick)
 Cancel a non-terminal execution before its Active transaction.
 
const ActionExecution * find (ActionExecutionId id) const noexcept
 Find a borrowed read-only execution view, or null when absent.
 
ActionExecution * find (ActionExecutionId id) noexcept
 Find a borrowed mutable execution view for owner-side inspection.
 
std::size_t executionCount () const noexcept
 Number of executions retained by this runtime.
 
void clear () noexcept
 Discard every retained execution and restart deterministic local ids at one.
 

详细描述

Deterministic action lifecycle coordinator.

No method reads a clock. advance() consumes only the supplied tick and duration. Structural execution storage is owned here; adapters only submit requests and observe results.

在文件 Action.h 第 485 行定义.

构造及析构函数说明

◆ ActionRuntime() [1/3]

eve::action::ActionRuntime::ActionRuntime ( ActionServices  services = {})
inlineexplicit

Bind borrowed composition ports to this owner-thread runtime.

参数
servicesProviders used synchronously during validation and Active.
备注
Every non-null provider must outlive this runtime and obey its own thread/reentrancy contract.

在文件 Action.h 第 493 行定义.

◆ ActionRuntime() [2/3]

eve::action::ActionRuntime::ActionRuntime ( const ActionRuntime &  )
delete

◆ ActionRuntime() [3/3]

eve::action::ActionRuntime::ActionRuntime ( ActionRuntime &&  )
delete

◆ ~ActionRuntime()

eve::action::ActionRuntime::~ActionRuntime ( )
default

Action runtime.

成员函数说明

◆ advance()

Result< ActionAdvance > eve::action::ActionRuntime::advance ( ActionExecutionId  id,
SimulationTick  tick,
Duration  delta 
)

Advance one execution by an injected simulation duration.

参数
idExecution identity returned by submit.
tickNon-decreasing simulation tick for this call.
deltaNon-negative simulation duration; zero is allowed.
返回
Transition summary, or a structured failure. A failed/cancelled execution is observable through find() after the failure.

在文件 Action.cpp 第 354 行定义.

引用了 eve::action::Active, eve::action::ActionTiming::active, active, eve::Applied, eve::action::Cancelled, eve::action::Completed, eve::action::Failed, eve::Result< T >::failure(), find(), eve::Duration::fromNanoseconds(), id, eve::Duration::isZero(), eve::Duration::nanoseconds(), eve::NoOp, phase, eve::action::Recover, eve::action::ActionTiming::recover, eve::action::Requested, eve::action::ActionExecution::status(), eve::Status::success(), eve::Result< T >::success(), tick, eve::action::ActionDefinition::timeline, eve::action::ActionDefinition::timing, valid, eve::action::Validating, eve::action::Windup, eve::action::ActionTiming::windup , 以及 eve::Duration::zero().

◆ cancel()

Result< void > eve::action::ActionRuntime::cancel ( ActionExecutionId  id,
SimulationTick  tick 
)

Cancel a non-terminal execution before its Active transaction.

参数
idExecution identity returned by submit.
tickDeterministic simulation tick at cancellation.
返回
Applied/NoOp operation result, or a structured cancellation failure. No reservation exists across frames; after Active has committed, cancellation does not undo the committed operation.

在文件 Action.cpp 第 514 行定义.

引用了 eve::Applied, eve::action::Cancelled, eve::action::Completed, eve::Conflict, eve::Diagnostic::error(), eve::action::Failed, eve::Result< T >::failure(), eve::Status::failure(), find(), eve::NoOp, eve::Status::success(), eve::Result< T >::success(), tick , 以及 eve::Duration::zero().

被这些函数引用 eve::action::AbilityRuntime::activate().

◆ clear()

void eve::action::ActionRuntime::clear ( )
noexcept

Discard every retained execution and restart deterministic local ids at one.

在文件 Action.cpp 第 531 行定义.

◆ executionCount()

std::size_t eve::action::ActionRuntime::executionCount ( ) const
inlinenoexcept

Number of executions retained by this runtime.

在文件 Action.h 第 546 行定义.

◆ find() [1/2]

const ActionExecution * eve::action::ActionRuntime::find ( ActionExecutionId  id) const
noexcept

Find a borrowed read-only execution view, or null when absent.

返回
Borrowed storage owned by this runtime; valid until erase or ActionRuntime destruction. @lifetime The caller must not retain the pointer beyond that owner.

在文件 Action.cpp 第 168 行定义.

被这些函数引用 eve::action::AbilityRuntime::activate(), advance(), cancel() , 以及 eve::action::AbilityRuntime::synchronize().

◆ find() [2/2]

ActionExecution * eve::action::ActionRuntime::find ( ActionExecutionId  id)
noexcept

Find a borrowed mutable execution view for owner-side inspection.

返回
Borrowed storage owned by this runtime; valid until erase or ActionRuntime destruction. @lifetime The caller must not retain the pointer beyond that owner.

在文件 Action.cpp 第 173 行定义.

◆ operator=() [1/2]

ActionRuntime & eve::action::ActionRuntime::operator= ( ActionRuntime &&  )
delete

◆ operator=() [2/2]

ActionRuntime & eve::action::ActionRuntime::operator= ( const ActionRuntime &  )
delete

◆ submit()

Result< ActionExecutionId > eve::action::ActionRuntime::submit ( ActionDefinition  definition,
ActionRequest  request 
)

Submit a validated definition/request pair in Requested phase.

参数
definitionDefinition copied into the execution.
requestRequest copied into the execution.
返回
New execution id or a structured rejection; no state is created when validation fails.

在文件 Action.cpp 第 148 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Pending, request, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 eve::action::AbilityRuntime::activate().


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