OpenMS
Loading...
Searching...
No Matches
PeptideIdentificationList.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: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13
14namespace OpenMS
15{
65 class OPENMS_DLLAPI PeptideIdentificationList : public ExposedVector<PeptideIdentification>
66 {
67 public:
69
70
72
74 : ExposedVector<PeptideIdentification>(vec.begin(), vec.end()) {}
75
77 PeptideIdentificationList(std::vector<PeptideIdentification>&& vec)
78 : ExposedVector<PeptideIdentification>(std::make_move_iterator(vec.begin()),
79 std::make_move_iterator(vec.end())) {}
80
82 PeptideIdentificationList(std::initializer_list<PeptideIdentification> init)
83 : ExposedVector<PeptideIdentification>(init.begin(), init.end()) {}
85
87
88
89 PeptideIdentificationList& operator=(const std::vector<PeptideIdentification>& vec)
90 {
91 assign(vec.begin(), vec.end());
92 return *this;
93 }
94
96 PeptideIdentificationList& operator=(std::vector<PeptideIdentification>&& vec)
97 {
98 data_ = std::move(vec);
99 return *this;
100 }
101
103 PeptideIdentificationList& operator=(std::initializer_list<PeptideIdentification> init)
104 {
105 assign(init.begin(), init.end());
106 return *this;
107 }
109
110 };
111
112} //namespace OpenMS
#define EXPOSED_VECTOR_INTERFACE(InnerElement)
Macro to expose common dependent types, such as iterator in the derived class.
Definition ExposedVector.h:26
Definition ExposedVector.h:62
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
PeptideIdentificationList(std::vector< PeptideIdentification > &&vec)
Move constructor from std::vector.
Definition PeptideIdentificationList.h:77
PeptideIdentificationList & operator=(std::initializer_list< PeptideIdentification > init)
Assignment from initializer list.
Definition PeptideIdentificationList.h:103
PeptideIdentificationList(std::initializer_list< PeptideIdentification > init)
Constructor from initializer list.
Definition PeptideIdentificationList.h:82
PeptideIdentificationList & operator=(std::vector< PeptideIdentification > &&vec)
Move assignment from std::vector.
Definition PeptideIdentificationList.h:96
PeptideIdentificationList & operator=(const std::vector< PeptideIdentification > &vec)
Assignment from std::vector.
Definition PeptideIdentificationList.h:89
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
STL namespace.