载入中...
搜索中...
未找到
SequenceAsset.cpp
浏览该文件的文档.
39 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence asset has no id", "id", {}, "dnut.sequence"));
42 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence asset has no entry node", "entry", {}, "dnut.sequence"));
45 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence asset version must be positive", "version", {}, "dnut.sequence"));
51 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence parameter has an empty name", "parameters", {}, "dnut.sequence"));
54 eve::Diagnostic::error(eve::DiagnosticCode::AlreadyExists, "duplicate sequence parameter '" + parameter.name + "'", "parameters." + parameter.name, {}, "dnut.sequence"));
57 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "required sequence parameter '" + parameter.name + "' cannot have a default", "parameters." + parameter.name, {}, "dnut.sequence"));
64 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence node has an empty id", "nodes", {}, "dnut.sequence"));
67 eve::Diagnostic::error(eve::DiagnosticCode::AlreadyExists, "duplicate sequence node id '" + node.id + "'", "nodes." + node.id, {}, "dnut.sequence"));
70 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence node '" + node.id + "' has no type", "nodes." + node.id + ".type", {}, "dnut.sequence"));
73 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence node '" + node.id + "' payload must be an object", "nodes." + node.id + ".payload", {}, "dnut.sequence"));
77 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "sequence route payload must be an object", "nodes." + node.id + ".routes", {}, "dnut.sequence"));
83 eve::Diagnostic::error(eve::DiagnosticCode::NotFound, "entry node '" + entry + "' does not exist", "entry", {}, "dnut.sequence"));
89 eve::Diagnostic::error(eve::DiagnosticCode::NotFound, "sequence node '" + owner + "' references missing node '" + reference + "'", "nodes." + owner + "." + field, {}, "dnut.sequence"));
100 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "call node '" + node.id + "' requires a target asset id", "nodes." + node.id + ".payload.target", {}, "dnut.sequence"));
105 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "call node '" + node.id + "' return must be a node id", "nodes." + node.id + ".payload.return", {}, "dnut.sequence"));
113 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "choice node '" + node.id + "' requires at least one route", "nodes." + node.id + ".routes", {}, "dnut.sequence"));
118 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "choice node '" + node.id + "' has a route without a label", "nodes." + node.id + ".routes", {}, "dnut.sequence"));
121 eve::Diagnostic::error(eve::DiagnosticCode::AlreadyExists, "choice node '" + node.id + "' has duplicate route label '" + route.label + "'", "nodes." + node.id + ".routes", {}, "dnut.sequence"));
127 eve::Diagnostic::error(eve::DiagnosticCode::InvariantViolation, "branch node '" + node.id + "' requires at least one route", "nodes." + node.id + ".routes", {}, "dnut.sequence"));
Domain-neutral compiled sequence graph for `.dnut` sources.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
const std::string & asString() const
Return the string payload; the caller must have checked the kind.
Definition Value.cpp:87
Value * find(const std::string &key) noexcept
Return an object member, or nullptr when absent.
Definition Value.cpp:124
Definition ConversationDialect.cpp:13
bool isCoreSequenceNodeType(const std::string &type) noexcept
Return whether type is a control-flow type interpreted by the runtime.
Definition SequenceAsset.cpp:13
const char * sequenceParameterTypeName(SequenceParameterType type) noexcept
Return the stable lowercase spelling of a parameter type.
Definition SequenceAsset.cpp:18
SequenceParameterType
Declared value kind for one sequence invocation parameter.
Definition SequenceAsset.h:18
@ NotFound
@ AlreadyExists
@ InvariantViolation
eve::Result< void > validate() const
Validate stable identifiers, the entry point and every graph reference.
Definition SequenceAsset.cpp:36
const SequenceNode * findNode(const std::string &nodeId) const noexcept
Find one node by its stable identifier.
Definition SequenceAsset.cpp:29
std::vector< SequenceParameter > parameters
Definition SequenceAsset.h:82