| 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 | { |
no test coverage detected