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.
构造及析构函数说明
◆ 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 第 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.
- 参数
-
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 第 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().
◆ clear()
|
noexcept |
Discard every retained execution and restart deterministic local ids at one.
在文件 Action.cpp 第 531 行定义.
◆ executionCount()
|
inlinenoexcept |
◆ 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 第 168 行定义.
被这些函数引用 eve::action::AbilityRuntime::activate(), advance(), cancel() , 以及 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 第 173 行定义.
◆ operator=() [1/2]
|
delete |
◆ operator=() [2/2]
|
delete |
◆ 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 第 148 行定义.
引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Pending, request, eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/action/Action.h
- src/modules/action/Action.cpp