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

Method entryNode

libchigraph/src/GraphFunction.cpp:44–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44NodeInstance* GraphFunction::entryNode() const noexcept {
45 auto matching = nodesWithType("lang", "entry");
46
47 if (matching.size() == 1) {
48 auto& vec = matching[0]->type().dataOutputs();
49 // make sure it has the same signature as the method
50 if (!std::equal(dataInputs().begin(), dataInputs().end(), vec.begin(), vec.end())) {
51 return nullptr;
52 }
53 // make sure it has the same exec names and size
54 auto foundExecOutputs = matching[0]->type().execOutputs();
55 if (!std::equal(execInputs().begin(), execInputs().end(), foundExecOutputs.begin(),
56 foundExecOutputs.end())) {
57 return nullptr;
58 }
59 return matching[0];
60 }
61 return nullptr;
62}
63
64Result GraphFunction::insertNode(std::unique_ptr<NodeType> type, float x, float y,
65 boost::uuids::uuid id, NodeInstance** toFill) {

Callers 4

DebuggerTests.cppFile · 0.80
compileFunctionFunction · 0.80

Calls 3

typeMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected