载入中...
搜索中...
未找到
eve::action::IActionResourceProvider类 参考abstract
Resource-account lookup port for canonical CostSpec operations. 更多...
#include <Action.h>
Public 成员函数 | |
| virtual | ~IActionResourceProvider ()=default |
| Releases IActionResourceProvider resources. | |
| virtual Result< resource::Affordability > | canAfford (const ActionDefinition &definition, const ActionRequest &request, const resource::CostSpec &cost) const =0 |
| Query affordability without reserving or mutating an account. | |
| virtual Result< resource::Reservation > | reserve (const ActionDefinition &definition, const ActionRequest &request, const resource::CostSpec &cost)=0 |
| Reserve a cost at the Active boundary. | |
| virtual Result< resource::Receipt > | commit (const resource::Reservation &reservation)=0 |
| Commit a reservation by its account nonce. | |
| virtual Result< void > | rollback (const resource::Reservation &reservation)=0 |
| Roll back a reservation by its account nonce. | |
详细描述
Resource-account lookup port for canonical CostSpec operations.
The returned account is borrowed only for the immediate call sequence. The runtime deliberately does not store its raw pointer across frames; an adapter must return the same authoritative account for a request when commit or rollback is later requested.
构造及析构函数说明
◆ ~IActionResourceProvider()
|
virtualdefault |
Releases IActionResourceProvider resources.
成员函数说明
◆ canAfford()
|
pure virtual |
Query affordability without reserving or mutating an account.
- 参数
-
definition Action definition being validated. request Original action request. cost Canonical cost borrowed for this call.
- 返回
- Affordability or a structured provider failure.
◆ commit()
|
pure virtual |
Commit a reservation by its account nonce.
- 参数
-
reservation Credential returned by reserve.
- 返回
- Debit receipt or a structured failure.
- 备注
- Implementations must route by reservation.account, not by the current/default account for the request. An unsuccessful commit must leave the reservation rollback-able; a provider must not report failure after exposing a debit without compensation.
◆ reserve()
|
pure virtual |
Reserve a cost at the Active boundary.
- 参数
-
definition Action definition being activated. request Original action request. cost Canonical cost borrowed for this call.
- 返回
- Reservation credential or a failure with no mutation.
- 备注
- A successful reservation creates a nonce route owned by this provider. Changing the provider's default account, replacing an account in the current selection, or unloading that default account must not discard the route before commit/rollback.
◆ rollback()
|
pure virtual |
Roll back a reservation by its account nonce.
- 参数
-
reservation Credential returned by reserve.
- 返回
- Applied or a structured failure.
- 备注
- Implementations must use the same nonce route as commit, even if the provider's current account selection has changed or its default account has been unloaded. An unknown nonce must fail explicitly and must never fall back to the current account.
该类的文档由以下文件生成:
- src/modules/action/Action.h