EvaluationContext backed by one borrowed RPG actor and SkillDefinition. 更多...
#include <SkillCondition.h>
Public 成员函数 | |
| SkillConditionContext (const RPGActor *actor, const SkillDefinition &definition, SkillConditionQueries queries={}) | |
| Bind a read-only actor/skill pair for one synchronous evaluation. | |
| std::optional< eve::Value > | value (std::string_view key) const override |
| Query a named scalar or structured value for Compare nodes. | |
| std::optional< bool > | hasTag (std::string_view tag) const override |
| Query tag membership; nullopt means the tag source is unavailable. | |
| std::optional< eve::Value > | attribute (std::string_view key) const override |
| Query an attribute value; nullopt means the attribute is absent. | |
| std::optional< eve::Value > | resource (std::string_view key) const override |
| Query a resource amount or resource marker. | |
| std::optional< eve::Value > | state (std::string_view key) const override |
| Query a state value for StateEquals nodes. | |
| std::optional< bool > | authority (std::string_view scope) const override |
| Query authority without changing grants, leases, or state. | |
| std::optional< decision::ConditionResult > | policy (std::string_view name, const eve::Value &arguments) const override |
| Evaluate a named read-only policy with owned arguments. | |
Public 成员函数 继承自 eve::decision::EvaluationContext | |
| virtual | ~EvaluationContext ()=default |
| Releases EvaluationContext resources. | |
详细描述
EvaluationContext backed by one borrowed RPG actor and SkillDefinition.
The actor and definition are observed only for the synchronous call to Condition::evaluate; this context does not own or retain them beyond that call. Attributes and resource amounts are read from the canonical AttributeSet. Tags include both skill-definition tags and active RPG status tags.
在文件 SkillCondition.h 第 46 行定义.
构造及析构函数说明
◆ SkillConditionContext()
| eve::rpg::SkillConditionContext::SkillConditionContext | ( | const RPGActor * | actor, |
| const SkillDefinition & | definition, | ||
| SkillConditionQueries | queries = {} |
||
| ) |
Bind a read-only actor/skill pair for one synchronous evaluation.
- 参数
-
actor Borrowed actor; it must outlive the evaluation call. definition Borrowed skill definition; it must outlive the call. queries Optional read-only authority and policy providers.
在文件 SkillCondition.cpp 第 30 行定义.
成员函数说明
◆ attribute()
|
overridevirtual |
Query an attribute value; nullopt means the attribute is absent.
Attribute.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 44 行定义.
引用了 eve::rpg::AttributeSystem::getFinal(), eve::rpg::AttributeSystem::hasAttribute() , 以及 key.
被这些函数引用 resource().
◆ authority()
|
overridevirtual |
Query authority without changing grants, leases, or state.
Authority.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 59 行定义.
◆ hasTag()
|
overridevirtual |
Query tag membership; nullopt means the tag source is unavailable.
True when tag.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 38 行定义.
引用了 eve::rpg::SkillDefinition::hasTag() , 以及 tag.
◆ policy()
|
overridevirtual |
Evaluate a named read-only policy with owned arguments.
Policy.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 64 行定义.
引用了 name , 以及 eve::rpg::SkillConditionQueries::policy.
◆ resource()
|
overridevirtual |
Query a resource amount or resource marker.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 51 行定义.
引用了 attribute() , 以及 key.
◆ state()
|
overridevirtual |
Query a state value for StateEquals nodes.
State.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 57 行定义.
◆ value()
|
overridevirtual |
Query a named scalar or structured value for Compare nodes.
实现了 eve::decision::EvaluationContext.
在文件 SkillCondition.cpp 第 34 行定义.
引用了 key.
该类的文档由以下文件生成:
- src/modules/rpg/SkillCondition.h
- src/modules/rpg/SkillCondition.cpp
Public 成员函数 继承自