MCPcopy Create free account
hub / github.com/MITK/MITK / FindNodes

Method FindNodes

Modules/CppMicroServices/src/usModuleResourceContainer.cpp:181–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void ModuleResourceContainer::FindNodes(const std::string& path, const std::string& filePattern,
182 bool recurse, std::vector<ModuleResource>& resources) const
183{
184 std::vector<std::string> names;
185 std::vector<uint32_t> indices;
186
187 this->GetChildren(path, true, names, indices);
188
189 for(std::size_t i = 0, s = names.size(); i < s; ++i)
190 {
191 if (*names[i].rbegin() == '/' && recurse)
192 {
193 this->FindNodes(path + names[i], filePattern, recurse, resources);
194 }
195 if (this->Matches(names[i], filePattern))
196 {
197 resources.push_back(ModuleResource(indices[i], *this));
198 }
199 }
200}
201
202bool ModuleResourceContainer::Matches(const std::string& name, const std::string& filePattern)
203{

Callers 1

FindResourcesMethod · 0.80

Calls 4

GetChildrenMethod · 0.95
MatchesMethod · 0.95
ModuleResourceClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected