Decision EvaluationContext backed by one dialogue subject. 更多...
#include <DialogueState.h>
Public 成员函数 | |
| StateEvaluationContext (std::string subject={}, eve::IStateQuery *provider=nullptr) | |
| Construct a context for a stable subject id and optional provider. | |
| void | setSubject (std::string subject) |
| Change the subject used by subsequent synchronous queries. | |
| void | setProvider (eve::IStateQuery *provider) noexcept |
| Set a borrowed query provider valid for this context's lifetime. | |
| void | setPolicyEvaluator (std::function< std::optional< eve::condition::ConditionResult >(std::string_view, const eve::Value &)> evaluator) |
| Install a read-only policy callback without retaining its arguments. | |
| std::optional< eve::Value > | value (std::string_view key) const override |
| Query a named scalar or structured value for Compare nodes. | |
| std::optional< eve::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. | |
详细描述
Decision EvaluationContext backed by one dialogue subject.
The explicit provider is borrowed for this context. When it does not know a query, the context checks the registered IStateQuery capability/listeners. A known false result is never confused with an unavailable provider.
在文件 DialogueState.h 第 86 行定义.
构造及析构函数说明
◆ StateEvaluationContext()
|
explicit |
Construct a context for a stable subject id and optional provider.
在文件 DialogueState.cpp 第 227 行定义.
成员函数说明
◆ policy()
|
overridevirtual |
Evaluate a named read-only policy with owned arguments.
Policy.
实现了 eve::condition::EvaluationContext.
在文件 DialogueState.cpp 第 269 行定义.
引用了 eve::state::IStateQuery::authority(), name, provider, eve::condition::resolveAuthorityAllow(), scope , 以及 subject.
◆ setPolicyEvaluator()
|
inline |
Install a read-only policy callback without retaining its arguments.
在文件 DialogueState.h 第 96 行定义.
◆ setProvider()
|
inlinenoexcept |
Set a borrowed query provider valid for this context's lifetime.
在文件 DialogueState.h 第 94 行定义.
引用了 provider.
◆ setSubject()
| void eve::dialogue::StateEvaluationContext::setSubject | ( | std::string | subject | ) |
Change the subject used by subsequent synchronous queries.
在文件 DialogueState.cpp 第 230 行定义.
引用了 subject.
◆ value()
|
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.
实现了 eve::condition::EvaluationContext.
在文件 DialogueState.cpp 第 232 行定义.
引用了 eve::state::IStateQuery::attribute(), eve::state::IStateQuery::hasTag(), eve::condition::kAttrPrefix, key, eve::condition::kResourcePrefix, eve::condition::kStatePrefix, eve::condition::kTagPrefix, provider, eve::state::IStateQuery::resource(), resource, result, eve::state::IStateQuery::state(), state, eve::condition::stripPrefix(), subject, tag , 以及 eve::state::IStateQuery::value().
被这些函数引用 eve::dialogue::DialogueStateContext::hasTag() , 以及 eve::dialogue::DialogueStateContext::resource().
该类的文档由以下文件生成:
- src/modules/dialogue/DialogueState.h
- src/modules/dialogue/DialogueState.cpp
Public 成员函数 继承自