载入中...
搜索中...
未找到
ConditionCodec.cpp
浏览该文件的文档.
15eve::Result<condition::Condition> decodeCondition(const eve::Value& value) { return condition::decodeCondition(value); }
71 if (out.empty() || (declaration && declaration->dependencies.empty() && condition.key().empty())) {
74 "policy_call conditions require a policy name or declared dependencies for indexing", "policy", {},
90 eve::DiagnosticCode::InvalidArgument, "condition tree is invalid", "condition", {}, "emergence.watch"));
99 return eve::Result<std::vector<std::string>>::success(std::vector<std::string>(unique.begin(), unique.end()));
Canonical Compare key prefixes and PolicyCall names for thin conditions.
Derive inverted-index watch keys from a condition::Condition AST.
Stable, structured diagnostics shared by engine modules.
Authoritative, rule-visible world facts implementing EvaluationContext.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Type kind() const noexcept
Compatibility spelling for the former dialogue data tree.
Definition Value.h:96
Value * find(const std::string &key) noexcept
Return an object member, or nullptr when absent.
Definition Value.cpp:244
Shared Value codec for thin condition::Condition trees.
Value/JSON codec for condition::Condition trees owned by emergence rules.
eve::Result< Condition > decodeCondition(const eve::Value &value)
Decode one condition tree from an owning Value.
Definition ConditionCodec.cpp:298
constexpr std::string_view kAuthorityAllowPolicy
PolicyCall name for read-only authority checks.
Definition ConditionKeys.h:33
Definition ConditionCodec.cpp:13
@ Authority
eve::Result< std::pair< FactDomain, std::string > > parseFactKey(std::string_view key)
Parse a canonical watch key into domain and leaf name.
Definition FactStore.cpp:114
eve::Result< condition::Condition > decodeCondition(const eve::Value &value)
Decode one validated condition tree from an owning Value.
Definition ConditionCodec.cpp:15
eve::Result< std::vector< std::string > > collectWatchKeys(const condition::Condition &condition)
Collect the canonical fact keys a condition depends on.
Definition ConditionCodec.cpp:87
std::string makeFactKey(FactDomain domain, std::string_view name)
Build the canonical watch key for one fact domain.
Definition FactStore.cpp:107
@ InvalidArgument