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

Method createEntryNodeType

libchigraph/src/GraphFunction.cpp:156–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156Result GraphFunction::createEntryNodeType(std::unique_ptr<NodeType>* toFill) const {
157 Result res;
158
159 nlohmann::json entry = nlohmann::json::object();
160
161 auto& data = entry["data"];
162 data = nlohmann::json::array();
163 for (auto in : dataInputs()) { data.push_back({{in.name, in.type.qualifiedName()}}); }
164
165 auto& exec = entry["exec"];
166 exec = nlohmann::json::array();
167 for (const auto& in : execInputs()) { exec.push_back(in); }
168
169 res += context().nodeTypeFromModule("lang", "entry", entry, toFill);
170
171 return res;
172}
173
174Result GraphFunction::createExitNodeType(std::unique_ptr<NodeType>* toFill) const {
175 Result res;

Callers 1

Calls 2

nodeTypeFromModuleMethod · 0.80
qualifiedNameMethod · 0.45

Tested by

no test coverage detected