MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / copySubset

Method copySubset

src/openms/source/DATASTRUCTURES/Param.cpp:729–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727 }
728
729 Param Param::copySubset(const Param& subset) const
730 {
731 ParamNode out("ROOT", "");
732
733 for (const auto& entry : subset.root_.entries)
734 {
735 const auto& n = root_.findEntry(entry.name);
736 if (n == root_.entries.end())
737 {
738 OPENMS_LOG_WARN << "Warning: Trying to copy non-existent parameter entry " << entry.name << std::endl;
739 }
740 else
741 {
742 out.insert(*n);
743 }
744 }
745
746 for (const auto& node : subset.root_.nodes)
747 {
748 const auto& n = root_.findNode(node.name);
749 if (n == root_.nodes.end())
750 {
751 OPENMS_LOG_WARN << "Warning: Trying to copy non-existent parameter node " << node.name << std::endl;
752 }
753 else
754 {
755 out.insert(*n);
756 }
757 }
758 return Param(out);
759 }
760
761 Param Param::copy(const std::string& prefix, bool remove_prefix) const
762 {

Callers 5

SwathTabWidgetMethod · 0.80
main_Method · 0.80
main_Method · 0.80
main_Method · 0.80

Calls 5

findEntryMethod · 0.80
findNodeMethod · 0.80
ParamClass · 0.50
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected