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

Method nodesWithType

libchigraph/src/GraphFunction.cpp:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87std::vector<NodeInstance*> GraphFunction::nodesWithType(const boost::filesystem::path& module,
88 boost::string_view name) const noexcept {
89 std::vector<NodeInstance*> ret;
90 for (const auto& node : mNodes) {
91 if (node.second->type().module().fullName() == module &&
92 node.second->type().name() == name) {
93 ret.push_back(node.second.get());
94 }
95 }
96
97 return ret;
98}
99
100Result GraphFunction::insertNode(const boost::filesystem::path& moduleName,
101 boost::string_view typeName, const nlohmann::json& typeJSON,

Callers 1

findInstancesOfTypeMethod · 0.80

Calls 4

fullNameMethod · 0.80
typeMethod · 0.80
getMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected