| 201 | |
| 202 | |
| 203 | IdentificationData::InputFileRef |
| 204 | IdentificationData::registerInputFile(const InputFile& file) |
| 205 | { |
| 206 | if (!no_checks_ && file.name.empty()) // key may not be empty |
| 207 | { |
| 208 | String msg = "input file must have a name"; |
| 209 | throw Exception::IllegalArgument(__FILE__, __LINE__, |
| 210 | OPENMS_PRETTY_FUNCTION, msg); |
| 211 | } |
| 212 | auto result = input_files_.insert(file); |
| 213 | if (!result.second) // existing element - merge in new information |
| 214 | { |
| 215 | input_files_.modify(result.first, [&file](InputFile& existing) |
| 216 | { |
| 217 | existing.merge(file); |
| 218 | }); |
| 219 | } |
| 220 | |
| 221 | return result.first; |
| 222 | } |
| 223 | |
| 224 | |
| 225 | IdentificationData::ProcessingSoftwareRef |
no test coverage detected