OpenMS
IdentifiedMolecule.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hendrik Weisser $
6 // $Authors: Hendrik Weisser $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
15 
16 #include <variant>
17 
18 namespace OpenMS
19 {
20  namespace IdentificationDataInternal
21  {
22  typedef std::variant<IdentifiedPeptideRef, IdentifiedCompoundRef,
24 
28  struct OPENMS_DLLAPI IdentifiedMolecule: public RefVariant
29  {
30  IdentifiedMolecule() = default;
31 
35 
37 
39 
41 
43 
45 
46  String toString() const;
47 
48  EmpiricalFormula getFormula(Size fragment_type = 0, Int charge = 0) const;
49  };
50 
51  OPENMS_DLLAPI bool operator==(const IdentifiedMolecule& a, const IdentifiedMolecule& b);
52 
53  OPENMS_DLLAPI bool operator!=(const IdentifiedMolecule& a, const IdentifiedMolecule& b);
54 
55  OPENMS_DLLAPI bool operator<(const IdentifiedMolecule& a, const IdentifiedMolecule& b);
56 
57  }
58 }
Representation of an empirical formula.
Definition: EmpiricalFormula.h:59
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
bool operator<(const IdentifiedMolecule &a, const IdentifiedMolecule &b)
IteratorWrapper< IdentifiedCompounds::iterator > IdentifiedCompoundRef
Definition: IdentifiedCompound.h:55
IteratorWrapper< IdentifiedPeptides::iterator > IdentifiedPeptideRef
Definition: IdentifiedSequence.h:90
bool operator==(const IdentifiedMolecule &a, const IdentifiedMolecule &b)
MoleculeType
Definition: MetaData.h:40
std::variant< IdentifiedPeptideRef, IdentifiedCompoundRef, IdentifiedOligoRef > RefVariant
Definition: IdentifiedMolecule.h:23
bool operator!=(const IdentifiedMolecule &a, const IdentifiedMolecule &b)
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Variant type holding Peptide/Compound/Oligo references and convenience functions.
Definition: IdentifiedMolecule.h:29
IdentifiedMolecule(IdentifiedCompoundRef ref)
Definition: IdentifiedMolecule.h:33
IdentifiedMolecule(const IdentifiedMolecule &)=default
IdentifiedCompoundRef getIdentifiedCompoundRef() const
EmpiricalFormula getFormula(Size fragment_type=0, Int charge=0) const
IdentifiedMolecule(IdentifiedOligoRef ref)
Definition: IdentifiedMolecule.h:34
IdentifiedMolecule(IdentifiedPeptideRef ref)
Definition: IdentifiedMolecule.h:32
Wrapper that adds operator< to iterators, so they can be used as (part of) keys in maps/sets or multi...
Definition: MetaData.h:20