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.
构造及析构函数说明
◆ ActionRuntime() [1/3]
|
inlineexplicit |
◆ ActionRuntime() [2/3]
|
delete |
◆ ActionRuntime() [3/3]
|
delete |
◆ ~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.
- 参数
-
id Execution identity returned by submit. tick Non-decreasing simulation tick for this call. delta Non-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 第 473 行定义.
引用了 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, result, 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().
被这些函数引用 eve::action::ScriptActionRuntime::advanceAction() , 以及 eve::action::AbilityRuntime::step().
◆ cancel()
| Result< void > eve::action::ActionRuntime::cancel | ( | ActionExecutionId | id, |
| SimulationTick | tick | ||
| ) |
Cancel a non-terminal execution before its Active transaction.
- 参数
-
id Execution identity returned by submit. tick Deterministic 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()
|
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.
- 参数
-
id Execution identity returned by submit. sectionIndex Zero-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()
|
inlinenoexcept |
Number of executions retained by this runtime.
◆ find() [1/2]
|
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]
|
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]
|
delete |
◆ operator=() [2/2]
|
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.
- 参数
-
id Execution identity returned by submit. sectionIndex Zero-based physical section index in the execution's timeline. targetDuration Positive 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.
- 参数
-
definition Definition copied into the execution. request Request 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().
该类的文档由以下文件生成:
- src/modules/action/Action.h
- src/modules/action/Action.cpp