载入中...
搜索中...
未找到
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 > setSectionTimingOverride (ActionExecutionId id, std::size_t sectionIndex, Duration targetDuration)
 Retarget one physical section's simulation duration for an execution.
 
Result< void > clearSectionTimingOverride (ActionExecutionId id, std::size_t sectionIndex)
 Remove one transient section-duration override.
 
Result< double > sectionProgress (ActionExecutionId id, std::size_t sectionIndex) const
 Query authoritative normalized progress within a physical section.
 
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 第 540 行定义.

构造及析构函数说明

◆ 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 第 548 行定义.

◆ 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 
)

◆ 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 第 684 行定义.

引用了 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(), eve::action::AbilityRuntime::cancel() , 以及 eve::action::ScriptActionRuntime::cancelAction().

◆ clear()

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

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

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

◆ clearSectionTimingOverride()

Result< void > eve::action::ActionRuntime::clearSectionTimingOverride ( ActionExecutionId  id,
std::size_t  sectionIndex 
)

Remove one transient section-duration override.

参数
idExecution identity returned by submit.
sectionIndexZero-based physical section index.
返回
Applied when removed, NoOp when already absent, or a structured failure.
备注
Main simulation thread only. The current authored cursor is not changed.

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

引用了 eve::Applied, eve::Conflict, eve::Result< T >::failure(), find(), eve::NoOp, range, eve::Status::success(), eve::Result< T >::success() , 以及 eve::action::ActionDefinition::timeline.

◆ executionCount()

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

Number of executions retained by this runtime.

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

被这些函数引用 eve::action::ScriptActionRuntime::executionCount().

◆ 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 第 221 行定义.

被这些函数引用 eve::action::AbilityRuntime::activate(), advance(), cancel(), clearSectionTimingOverride(), eve::action::ScriptActionRuntime::findAction(), sectionProgress(), setSectionTimingOverride() , 以及 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 第 226 行定义.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ sectionProgress()

Result< double > eve::action::ActionRuntime::sectionProgress ( ActionExecutionId  id,
std::size_t  sectionIndex 
) const

Query authoritative normalized progress within a physical section.

返回
Progress in [0,1], or a structured execution/section failure.
备注
This is an owning value and remains valid after later advances.

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

引用了 eve::Conflict, find(), eve::Duration::nanoseconds(), offset, range, eve::Result< T >::success() , 以及 eve::action::ActionDefinition::timeline.

◆ setSectionTimingOverride()

Result< void > eve::action::ActionRuntime::setSectionTimingOverride ( ActionExecutionId  id,
std::size_t  sectionIndex,
Duration  targetDuration 
)

Retarget one physical section's simulation duration for an execution.

参数
idExecution identity returned by submit.
sectionIndexZero-based physical section index in the execution's timeline.
targetDurationPositive simulation duration used to traverse the authored section.
返回
Applied/NoOp, or a structured failure without changing the execution.
备注
Main simulation thread only; callbacks are not invoked. The authored cursor remains continuous when changed mid-section. Notify/state boundaries, lifecycle phases and presentation all consume the resulting authoritative cursor from advance().

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

引用了 eve::Applied, eve::Conflict, eve::Result< T >::failure(), find(), found, eve::InvalidArgument, eve::NoOp, range, eve::Status::success(), eve::Result< T >::success(), eve::action::ActionDefinition::timeline , 以及 eve::Duration::zero().

◆ 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 第 201 行定义.

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

被这些函数引用 eve::action::AbilityRuntime::activate() , 以及 eve::action::ScriptActionRuntime::submitAction().


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