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

Method getNewToolName

src/openms/source/APPLICATIONS/INIUpdater.cpp:69–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 }
68
69 bool INIUpdater::getNewToolName(const String & old_name, const String & tools_type, String & new_name)
70 {
71 new_name = "";
72 // try with type (as some new tools for one type might have the exact same name as old ones with several types)
73 TDE old_withtype(old_name, ListUtils::create<String>(tools_type));
74 if (map_.find(old_withtype) != map_.end())
75 {
76 new_name = map_[old_withtype].name;
77 return true;
78 }
79
80 // try without type
81 TDE old_notype(old_name, StringList());
82 if (map_.find(old_notype) != map_.end())
83 {
84 new_name = map_[old_notype].name;
85 return true;
86 }
87
88 // default to ToolHandler
89 const auto& topp = ToolHandler::getTOPPToolList(true);
90 if (topp.find(old_name) != topp.end())
91 {
92 new_name = old_name;
93 return true;
94 }
95
96 return false;
97 }
98
99 ToolMapping INIUpdater::map_;
100

Callers 3

updateTOPPASMethod · 0.80
updateINIMethod · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected