Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_peptide_quant_key.hpp
1/*
2##############################################################################
3# file: ms_peptide_quant_key.hpp #
4# 'msparser' toolkit #
5# Peptide quantitation key used in ms_quantitation #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2012 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Author: villek@matrixscience.com $ #
12# $Date: 2018-07-30 16:23:53 +0100 $ #
13# $Revision: #
14# $NoKeywords:: $ #
15##############################################################################
16*/
17
18#ifndef MS_PEPQUANTKEY_HPP
19#define MS_PEPQUANTKEY_HPP
20
21
22// Includes from the standard template library
23#include <string>
24
25namespace matrix_science {
32
68 class MS_MASCOTRESFILE_API ms_peptide_quant_key
69 {
70 public:
73
75 ms_peptide_quant_key(int q, int p);
76
78 ms_peptide_quant_key(int q, int p, int charge);
79
81 explicit ms_peptide_quant_key(int ID);
82
84 explicit ms_peptide_quant_key(const std::string &opaqueString);
85
87 explicit ms_peptide_quant_key(const std::string &opaqueString, int ID);
88
91
94
95#ifndef SWIG
97 ms_peptide_quant_key& operator=(const ms_peptide_quant_key& right);
98
100 bool operator<(const ms_peptide_quant_key& right) const;
101
103 bool operator<=(const ms_peptide_quant_key& right) const;
104
106 bool operator>(const ms_peptide_quant_key& right) const;
107
109 bool operator>=(const ms_peptide_quant_key& right) const;
110
112 bool operator==(const ms_peptide_quant_key& right) const;
113
115 bool operator!=(const ms_peptide_quant_key& right) const;
116#endif
117
118
119#ifndef SWIG
121 bool getQueryAndRank(int &q, int &p) const;
122
124 bool getCharge(int &charge) const;
125
127 bool getID(int &ID) const;
128
130 bool getOpaqueString(std::string & opaqueStringRef) const;
131
133 bool getOpaqueStringAndID(std::string & opaqueStringRef, int & ID) const;
134#else // SWIG Multiple return values
135 bool getQueryAndRank(int & OUTPUT, int & OUTPUT) const;
136 bool getCharge(int &OUTPUT) const;
137 bool getID(int &OUTPUT) const;
138 bool getOpaqueString(std::string & OUTPUT) const;
139 bool getOpaqueStringAndID(std::string & OUTPUT, int & OUTPUT) const;
140#endif
141
143 bool isNil() const;
144
146 static ms_peptide_quant_key fromSerialisedString(const std::string &serialisedStr);
147
149 std::string serialise() const;
150
152 static std::string serialisationFormatVersion();
153
154 private:
155 enum PEPQUANTKEY_TYPE {
156 PEPQUANTKEY_NIL,
157 PEPQUANTKEY_QP,
158 PEPQUANTKEY_QPCHARGE,
159 PEPQUANTKEY_ID,
160 PEPQUANTKEY_OPAQUE,
161 PEPQUANTKEY_OPAQUEID
162 };
163
164 int type_, q_, p_, charge_, ID_;
165 std::string *opaqueString_;
166 }; // end of quantitation_group
168} // matrix_science namespace
169
170#endif // MS_PEPQUANTKEY_HPP
171
172/*------------------------------- End of File -------------------------------*/
Feature key identifying a peptide ratio.
Definition: ms_peptide_quant_key.hpp:69