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

Method append

src/openms/source/DATASTRUCTURES/ToolDescription.cpp:67–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void ToolDescription::append(const ToolDescription& other)
68 {
69 // sanity check
70 if (is_internal != other.is_internal
71 || name != other.name
72 //|| category != other.category
73 || (is_internal && !external_details.empty())
74 || (other.is_internal && !other.external_details.empty())
75 || (!is_internal && external_details.size() != types.size())
76 || (!other.is_internal && other.external_details.size() != other.types.size())
77 )
78 {
79 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Extending (external) ToolDescription failed!", "");
80 }
81
82 // append types and external information
83 types.insert(types.end(), other.types.begin(), other.types.end());
84 external_details.insert(external_details.end(), other.external_details.begin(), other.external_details.end());
85
86 // check that types are unique
87 std::set<String> unique_check;
88 unique_check.insert(types.begin(), types.end());
89 if (unique_check.size() != types.size())
90 {
91 OPENMS_LOG_ERROR << "A type appears at least twice for the TOPP tool '" << name << "'. Types given are '" << ListUtils::concatenate(types, ", ") << "'\n";
92 if (name == "GenericWrapper")
93 {
94 OPENMS_LOG_ERROR << "Check the .ttd files in your share/ folder and remove duplicate types!\n";
95 }
96 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "see above!", "");
97 }
98 }
99 }
100
101 Internal::ToolDescription bla;

Callers 15

runScriptMethod · 0.45
expandPrefix_Method · 0.45
storeMethod · 0.45
loadMethod · 0.45
generateTrieDBMethod · 0.45
storeMethod · 0.45
addEnzymeInfoMethod · 0.45
loadMethod · 0.45
getColumnsMethod · 0.45
getSequencesMethod · 0.45
readOutHeaderMethod · 0.45

Calls 6

concatenateFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 3

storeMethod · 0.36
loadMethod · 0.36
generateTrieDBMethod · 0.36