OpenMS
ModificationDefinition.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: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 
10 #pragma once
11 
12 #include <OpenMS/CONCEPT/Types.h>
15 
16 namespace OpenMS
17 {
26  class OPENMS_DLLAPI ModificationDefinition
27  {
28 public:
29 
35 
38 
40  explicit ModificationDefinition(const String& mod, bool fixed = true, UInt max_occur = 0);
41 
43  explicit ModificationDefinition(const ResidueModification& mod, bool fixed = true, UInt max_occur = 0);
44 
48 
53  void setFixedModification(bool fixed);
54 
56  bool isFixedModification() const;
57 
60 
63 
66 
68  void setModification(const String& modification);
69 
77 
84 
89  bool operator==(const ModificationDefinition& rhs) const;
90 
92  bool operator!=(const ModificationDefinition& rhs) const;
93 
97 
98 protected:
99 
102 
105 
108  };
109 
110 } // namespace OpenMS
111 
Definition: ModificationDefinition.h:27
void setFixedModification(bool fixed)
sets whether this modification definition is fixed or variable (modification must occur vs....
UInt max_occurrences_
maximal number of occurrences per peptide
Definition: ModificationDefinition.h:107
ModificationDefinition(const String &mod, bool fixed=true, UInt max_occur=0)
detailed constructor specifying the modification by name
UInt getMaxOccurrences() const
returns the maximal number of occurrences per peptide
bool operator!=(const ModificationDefinition &rhs) const
inequality operator
ModificationDefinition()
default constructor
bool operator<(const OpenMS::ModificationDefinition &) const
less than operator for e.g. usage in maps; only mod FullIds are compared!
bool isFixedModification() const
returns if the modification if fixed true, else false
void setMaxOccurrences(UInt num)
set the maximal number of occurrences per peptide (unbounded if 0)
const ResidueModification & getModification() const
Returns the modification.
String getModificationName() const
returns the name of the modification
bool operator==(const ModificationDefinition &rhs) const
equality operator
virtual ~ModificationDefinition()
destructor
ModificationDefinition & operator=(const ModificationDefinition &element)
assignment operator
bool fixed_modification_
fixed (true) or variable (false)
Definition: ModificationDefinition.h:104
ModificationDefinition(const ModificationDefinition &rhs)
copy constructor
ModificationDefinition(const ResidueModification &mod, bool fixed=true, UInt max_occur=0)
direct constructor from a residue modification
void setModification(const String &modification)
sets the modification, allowed are unique names provided by ModificationsDB
const ResidueModification * mod_
the modification
Definition: ModificationDefinition.h:101
Representation of a modification on an amino acid residue.
Definition: ResidueModification.h:53
A more convenient string class.
Definition: String.h:34
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19