OpenMS
MetaData.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- 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 
11 #include <cstdint> // for "uintptr_t"
12 
13 namespace OpenMS
14 {
15  namespace IdentificationDataInternal
16  {
18  template <typename Iterator>
19  struct IteratorWrapper: public Iterator
20  {
22 
23  IteratorWrapper(const Iterator& it): Iterator(it) {}
24 
25  bool operator<(const IteratorWrapper& other) const
26  {
27  // compare by address of referenced element:
28  return &(**this) < &(*other);
29  }
30 
32  operator uintptr_t() const
33  {
34  return uintptr_t(&(**this));
35  }
36  };
37 
38 
40  {
43  RNA
44  };
45 
46 
47  enum MassType
48  {
50  AVERAGE
51  };
52  }
53 }
MoleculeType
Definition: MetaData.h:40
@ COMPOUND
Definition: MetaData.h:42
@ PROTEIN
Definition: MetaData.h:41
@ RNA
Definition: MetaData.h:43
MassType
Definition: MetaData.h:48
@ AVERAGE
Definition: MetaData.h:50
@ MONOISOTOPIC
Definition: MetaData.h:49
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Wrapper that adds operator< to iterators, so they can be used as (part of) keys in maps/sets or multi...
Definition: MetaData.h:20
bool operator<(const IteratorWrapper &other) const
Definition: MetaData.h:25
IteratorWrapper(const Iterator &it)
Definition: MetaData.h:23