| 474 | |
| 475 | |
| 476 | IdentificationData::AdductRef |
| 477 | IdentificationData::registerAdduct(const AdductInfo& adduct) |
| 478 | { |
| 479 | // @TODO: require non-empty name? (auto-generate from formula?) |
| 480 | auto result = adducts_.insert(adduct); |
| 481 | if (!result.second && (result.first->getName() != adduct.getName())) |
| 482 | { |
| 483 | OPENMS_LOG_WARN << "Warning: adduct '" << adduct.getName() |
| 484 | << "' is already known under the name '" |
| 485 | << result.first->getName() << "'"; |
| 486 | } |
| 487 | return result.first; |
| 488 | } |
| 489 | |
| 490 | |
| 491 | IdentificationData::ObservationMatchRef |