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

Method createExitNodeType

libchigraph/src/GraphFunction.cpp:174–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174Result GraphFunction::createExitNodeType(std::unique_ptr<NodeType>* toFill) const {
175 Result res;
176
177 nlohmann::json exit = nlohmann::json::object();
178
179 auto& data = exit["data"];
180 data = nlohmann::json::array();
181 for (auto out : dataOutputs()) { data.push_back({{out.name, out.type.qualifiedName()}}); }
182
183 auto& exec = exit["exec"];
184 exec = nlohmann::json::array();
185 for (const auto& out : execOutputs()) { exec.push_back(out); }
186
187 res += context().nodeTypeFromModule("lang", "exit", exit, toFill);
188
189 return res;
190}
191
192Result GraphFunction::getOrInsertEntryNode(float x, float y, boost::uuids::uuid id,
193 NodeInstance** toFill) {

Calls 2

nodeTypeFromModuleMethod · 0.80
qualifiedNameMethod · 0.45

Tested by

no test coverage detected