载入中...
搜索中...
未找到
eve::rpg::SkillConditionContext类 参考final

EvaluationContext backed by one borrowed RPG actor and SkillDefinition. 更多...

#include <SkillCondition.h>

类 eve::rpg::SkillConditionContext 继承关系图:
eve::decision::EvaluationContext

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.

参数
actorBorrowed actor; it must outlive the evaluation call.
definitionBorrowed skill definition; it must outlive the call.
queriesOptional read-only authority and policy providers.

在文件 SkillCondition.cpp 第 30 行定义.

成员函数说明

◆ attribute()

std::optional< eve::Value > eve::rpg::SkillConditionContext::attribute ( std::string_view  key) const
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()

std::optional< bool > eve::rpg::SkillConditionContext::authority ( std::string_view  scope) const
overridevirtual

Query authority without changing grants, leases, or state.

Authority.

实现了 eve::decision::EvaluationContext.

在文件 SkillCondition.cpp 第 59 行定义.

引用了 eve::rpg::SkillConditionQueries::authority , 以及 scope.

◆ hasTag()

std::optional< bool > eve::rpg::SkillConditionContext::hasTag ( std::string_view  tag) const
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()

std::optional< decision::ConditionResult > eve::rpg::SkillConditionContext::policy ( std::string_view  name,
const eve::Value &  arguments 
) const
overridevirtual

Evaluate a named read-only policy with owned arguments.

Policy.

实现了 eve::decision::EvaluationContext.

在文件 SkillCondition.cpp 第 64 行定义.

引用了 name , 以及 eve::rpg::SkillConditionQueries::policy.

◆ resource()

std::optional< eve::Value > eve::rpg::SkillConditionContext::resource ( std::string_view  key) const
overridevirtual

Query a resource amount or resource marker.

Resource.

实现了 eve::decision::EvaluationContext.

在文件 SkillCondition.cpp 第 51 行定义.

引用了 attribute() , 以及 key.

◆ state()

std::optional< eve::Value > eve::rpg::SkillConditionContext::state ( std::string_view  key) const
overridevirtual

Query a state value for StateEquals nodes.

State.

实现了 eve::decision::EvaluationContext.

在文件 SkillCondition.cpp 第 57 行定义.

引用了 key , 以及 value.

◆ value()

std::optional< eve::Value > eve::rpg::SkillConditionContext::value ( std::string_view  key) const
overridevirtual

Query a named scalar or structured value for Compare nodes.

Value.

实现了 eve::decision::EvaluationContext.

在文件 SkillCondition.cpp 第 34 行定义.

引用了 key.


该类的文档由以下文件生成: