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

Explain one condition evaluation in a UI- and log-friendly form. 更多...

#include <Condition.h>

Public 成员函数

bool passed () const noexcept
 Whether the condition passed.
 
ConditionReasonCode reasonCode () const noexcept
 Stable machine-readable reason code.
 
const Value & evidence () const noexcept
 Observed value or child evidence owned by this result.
 
const Value & details () const noexcept
 Structured details suitable for UI explanation.
 

静态 Public 成员函数

static ConditionResult success (Value evidence={}, Value details=Value::Object{})
 Construct a passed result with optional evidence and details.
 
static ConditionResult failed (ConditionReasonCode reason, Value evidence={}, Value details=Value::Object{})
 Construct a rejected result with a stable reason and explanation.
 

详细描述

Explain one condition evaluation in a UI- and log-friendly form.

evidence is the value observed at the leaf or returned by a policy. details contains stable field names and child explanations. Both values own their storage and remain valid after the evaluation context is gone.

在文件 Condition.h 第 128 行定义.

成员函数说明

◆ details()

const Value & eve::decision::ConditionResult::details ( ) const
inlinenoexcept

Structured details suitable for UI explanation.

在文件 Condition.h 第 143 行定义.

被这些函数引用 failed() , 以及 success().

◆ evidence()

const Value & eve::decision::ConditionResult::evidence ( ) const
inlinenoexcept

Observed value or child evidence owned by this result.

在文件 Condition.h 第 141 行定义.

被这些函数引用 failed(), eve::emergence::FactStore::setPolicy() , 以及 success().

◆ failed()

ConditionResult eve::decision::ConditionResult::failed ( ConditionReasonCode  reason,
Value  evidence = {},
Value  details = Value::Object{} 
)
static

Construct a rejected result with a stable reason and explanation.

在文件 Condition.cpp 第 137 行定义.

引用了 details() , 以及 evidence().

被这些函数引用 eve::decision::Condition::evaluate(), eve::dialogue::DialogueStateContext::evaluate() , 以及 eve::card::Card::evaluatePlay().

◆ passed()

bool eve::decision::ConditionResult::passed ( ) const
inlinenoexcept

Whether the condition passed.

在文件 Condition.h 第 137 行定义.

被这些函数引用 eve::dialogue::DialogueFlow::configureIntegration() , 以及 eve::emergence::FactStore::setPolicy().

◆ reasonCode()

ConditionReasonCode eve::decision::ConditionResult::reasonCode ( ) const
inlinenoexcept

Stable machine-readable reason code.

在文件 Condition.h 第 139 行定义.

被这些函数引用 eve::dialogue::DialogueFlow::configureIntegration() , 以及 eve::emergence::FactStore::setPolicy().

◆ success()

ConditionResult eve::decision::ConditionResult::success ( Value  evidence = {},
Value  details = Value::Object{} 
)
static

Construct a passed result with optional evidence and details.

在文件 Condition.cpp 第 133 行定义.

引用了 details(), evidence() , 以及 eve::decision::Passed.

被这些函数引用 eve::decision::Condition::evaluate().


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