OpenMS
Loading...
Searching...
No Matches
RichPeak2D.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: Timo Sachsenberg$
6// $Authors: Marc Sturm $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
15namespace OpenMS
16{
17
26 class OPENMS_DLLAPI RichPeak2D :
27 public Peak2D,
28 public MetaInfoInterface,
30 {
31public:
32
39
41 RichPeak2D(const RichPeak2D& p) = default;
42
44 explicit RichPeak2D(const Peak2D& p) :
45 Peak2D(p),
47 {
48 UniqueIdInterface::clearUniqueId();
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
72 {
73 if (this == &rhs) return *this;
74
75 Peak2D::operator=(rhs);
76 clearMetaInfo();
77 UniqueIdInterface::clearUniqueId();
78
79 return *this;
80 }
81
83 bool operator==(const RichPeak2D& rhs) const
84 {
85 return Peak2D::operator==(rhs) &&
86 MetaInfoInterface::operator==(rhs) &&
87 UniqueIdInterface::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:36
A 2-dimensional raw data point or peak.
Definition Peak2D.h:30
float IntensityType
Intensity type.
Definition Peak2D.h:37
A 2-dimensional raw data point or peak with meta information.
Definition RichPeak2D.h:30
RichPeak2D(const PositionType &pos, const IntensityType in)
Member constructor.
Definition RichPeak2D.h:52
RichPeak2D & operator=(const Peak2D &rhs)
Assignment operator.
Definition RichPeak2D.h:71
RichPeak2D & operator=(const RichPeak2D &rhs)=default
Assignment operator.
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=(RichPeak2D &&rhs) &=default
Move 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()
Default constructor.
Definition RichPeak2D.h:34
A base class defining a common interface for all classes having a unique id.
Definition UniqueIdInterface.h:25
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19