载入中...
搜索中...
未找到
eve::decision::EvaluationContext类 参考abstract

Read-only state boundary used by every condition evaluation. 更多...

#include <Condition.h>

类 eve::decision::EvaluationContext 继承关系图:
eve::card::CardPlayConditionContext eve::dialogue::StateEvaluationContext eve::emergence::FactStore eve::rpg::SkillConditionContext

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()

virtual eve::decision::EvaluationContext::~EvaluationContext ( )
virtualdefault

Releases EvaluationContext resources.

成员函数说明

◆ attribute()

virtual std::optional< Value > eve::decision::EvaluationContext::attribute ( std::string_view  key) const
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()

virtual std::optional< bool > eve::decision::EvaluationContext::authority ( std::string_view  scope) const
pure virtual

Query authority without changing grants, leases, or state.

在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.

◆ hasTag()

virtual std::optional< bool > eve::decision::EvaluationContext::hasTag ( std::string_view  tag) const
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()

virtual std::optional< ConditionResult > eve::decision::EvaluationContext::policy ( std::string_view  name,
const Value &  arguments 
) const
pure virtual

Evaluate a named read-only policy with owned arguments.

在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.

◆ resource()

virtual std::optional< Value > eve::decision::EvaluationContext::resource ( std::string_view  key) const
pure virtual

◆ state()

virtual std::optional< Value > eve::decision::EvaluationContext::state ( std::string_view  key) const
pure virtual

◆ value()

virtual std::optional< Value > eve::decision::EvaluationContext::value ( std::string_view  key) const
pure virtual

Query a named scalar or structured value for Compare nodes.

在 eve::card::CardPlayConditionContext, eve::dialogue::StateEvaluationContext, eve::emergence::FactStore , 以及 eve::rpg::SkillConditionContext 内被实现.


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