MCPcopy Create free account
hub / github.com/chigraph/chigraph / validateFunctionExecOutputs

Function validateFunctionExecOutputs

libchigraph/src/FunctionValidator.cpp:218–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218Result validateFunctionExecOutputs(const GraphFunction& func) {
219 // make sure all exec outputs exist, and raise an error otherwise.
220 // TODO (#70): quickfix to add return
221
222 Result res;
223
224 // make sure they all get the context
225 auto funcCtx =
226 res.addScopedContext({{"function", func.name()}, {"module", func.module().fullName()}});
227
228 for (const auto& nodepair : func.nodes()) {
229 auto node = nodepair.second.get();
230
231 auto id = 0ull;
232 for (const auto& conn : node->outputExecConnections) {
233 if (conn.second == ~0ull || conn.first == nullptr) {
234 res.addEntry("EUKN", "Node is missing an output exec connection",
235 {{"Node ID", node->stringId()}, {"Missing ID", id}});
236 }
237
238 ++id;
239 }
240 }
241
242 return res;
243}
244
245} // namespace chi

Callers 1

validateFunctionFunction · 0.85

Calls 6

addScopedContextMethod · 0.80
fullNameMethod · 0.80
getMethod · 0.80
addEntryMethod · 0.80
stringIdMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected