Read-only state boundary used by every condition evaluation. 更多...
#include <Condition.h>
Public 成员函数 | |
| virtual | ~EvaluationContext ()=default |
| Releases EvaluationContext resources. | |
| virtual std::optional< Value > | value (std::string_view key) const =0 |
| Query a named scalar or structured value for Compare nodes. | |
| virtual std::optional< bool > | hasTag (std::string_view tag) const =0 |
| Query tag membership; nullopt means the tag source is unavailable. | |
| virtual std::optional< Value > | attribute (std::string_view key) const =0 |
| Query an attribute value; nullopt means the attribute is absent. | |
| virtual std::optional< Value > | resource (std::string_view key) const =0 |
| Query a resource amount or resource marker. | |
| virtual std::optional< Value > | state (std::string_view key) const =0 |
| Query a state value for StateEquals nodes. | |
| virtual std::optional< bool > | authority (std::string_view scope) const =0 |
| Query authority without changing grants, leases, or state. | |
| virtual std::optional< ConditionResult > | policy (std::string_view name, const Value &arguments) const =0 |
| Evaluate a named read-only policy with owned arguments. | |
详细描述
Read-only state boundary used by every condition evaluation.
Implementations must not mutate domain state. Methods are synchronous and called on the caller's thread; implementations must not retain the caller's query keys or invoke unknown callbacks while holding a lock. nullopt means the requested capability/value is unavailable, which is distinct from a known false value.
在文件 Condition.h 第 166 行定义.
构造及析构函数说明
◆ ~EvaluationContext()
|
virtualdefault |
Releases EvaluationContext resources.
成员函数说明
◆ attribute()
|
pure virtual |
Query an attribute value; nullopt means the attribute is absent.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
◆ authority()
|
pure virtual |
Query authority without changing grants, leases, or state.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
◆ hasTag()
|
pure virtual |
Query tag membership; nullopt means the tag source is unavailable.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
◆ policy()
|
pure virtual |
Evaluate a named read-only policy with owned arguments.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
◆ resource()
|
pure virtual |
Query a resource amount or resource marker.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
◆ state()
|
pure virtual |
Query a state value for StateEquals nodes.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
◆ value()
|
pure virtual |
Query a named scalar or structured value for Compare nodes.
在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.
该类的文档由以下文件生成:
- src/modules/decision/Condition.h