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

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

#include <SkillCondition.h>

类 eve::rpg::SkillConditionContext 继承关系图:
eve::condition::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< condition::ConditionResult > policy (std::string_view name, const eve::Value &arguments) const override
 Evaluate a named read-only policy with owned arguments.
 
- Public 成员函数 继承自 eve::condition::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.

在文件 Skill.cpp 第 320 行定义.

成员函数说明

◆ policy()

std::optional< condition::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::condition::EvaluationContext.

在文件 Skill.cpp 第 348 行定义.

引用了 eve::rpg::SkillConditionQueries::authority, name, eve::rpg::SkillConditionQueries::policy, eve::condition::resolveAuthorityAllow() , 以及 scope.

◆ 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.

Canonical keys may use domain prefixes from ConditionKeys.h (tag:, attr:, resource:, state:). Bare keys are domain-defined.

Value.

实现了 eve::condition::EvaluationContext.

在文件 Skill.cpp 第 324 行定义.

引用了 eve::rpg::AttributeSystem::getFinal(), eve::rpg::AttributeSystem::hasAttribute(), eve::rpg::SkillDefinition::hasTag(), eve::condition::kAttrPrefix, key, eve::condition::kResourcePrefix, eve::condition::kStatePrefix, eve::condition::kTagPrefix, name, resource, state, eve::condition::stripPrefix() , 以及 tag.


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