OpenMS
RichPeak2D.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: Marc Sturm $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/KERNEL/Peak2D.h>
14 
15 namespace OpenMS
16 {
17 
26  class OPENMS_DLLAPI RichPeak2D :
27  public Peak2D,
28  public MetaInfoInterface,
29  public UniqueIdInterface
30  {
31 public:
32 
35  Peak2D(),
38  {}
39 
41  RichPeak2D(const RichPeak2D& p) = default;
42 
44  explicit RichPeak2D(const Peak2D& p) :
45  Peak2D(p),
47  {
49  }
50 
52  explicit RichPeak2D(const PositionType& pos, const IntensityType in) :
53  Peak2D(pos, in),
55  {}
56 
58  RichPeak2D(RichPeak2D&& p) = default;
59 
61  ~RichPeak2D() override
62  {}
63 
65  RichPeak2D & operator=(const RichPeak2D& rhs) = default;
66 
68  RichPeak2D & operator=(RichPeak2D&& rhs) & = default;
69 
71  RichPeak2D & operator=(const Peak2D& rhs)
72  {
73  if (this == &rhs) return *this;
74 
75  Peak2D::operator=(rhs);
76  clearMetaInfo();
78 
79  return *this;
80  }
81 
83  bool operator==(const RichPeak2D& rhs) const
84  {
85  return Peak2D::operator==(rhs) &&
88  }
89 
91  bool operator!=(const RichPeak2D& rhs) const
92  {
93  return !(operator==(rhs));
94  }
95 
96  };
97 
98 } // namespace OpenMS
99 
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:35
bool operator==(const MetaInfoInterface &rhs) const
Equality operator.
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:29
Peak2D & operator=(const Peak2D &rhs)=default
Assignment operator.
float IntensityType
Intensity type.
Definition: Peak2D.h:36
bool operator==(const Peak2D &rhs) const
Equality operator.
Definition: Peak2D.h:198
A 2-dimensional raw data point or peak with meta information.
Definition: RichPeak2D.h:30
RichPeak2D & operator=(RichPeak2D &&rhs) &=default
Move Assignment operator.
RichPeak2D(const PositionType &pos, const IntensityType in)
Member constructor.
Definition: RichPeak2D.h:52
RichPeak2D(RichPeak2D &&p)=default
Move constructor.
RichPeak2D(const Peak2D &p)
Constructor from Peak2D.
Definition: RichPeak2D.h:44
bool operator!=(const RichPeak2D &rhs) const
Equality operator.
Definition: RichPeak2D.h:91
RichPeak2D & operator=(const RichPeak2D &rhs)=default
Assignment operator.
~RichPeak2D() override
Destructor.
Definition: RichPeak2D.h:61
bool operator==(const RichPeak2D &rhs) const
Equality operator.
Definition: RichPeak2D.h:83
RichPeak2D(const RichPeak2D &p)=default
Copy constructor.
RichPeak2D & operator=(const Peak2D &rhs)
Assignment operator.
Definition: RichPeak2D.h:71
RichPeak2D()
Default constructor.
Definition: RichPeak2D.h:34
A base class defining a common interface for all classes having a unique id.
Definition: UniqueIdInterface.h:25
Size clearUniqueId()
Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed,...
Definition: UniqueIdInterface.h:85
bool operator==(UniqueIdInterface const &rhs) const
Equality comparison operator - the unique ids must be equal (!)
Definition: UniqueIdInterface.h:71
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19