00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MS_PEPQUANTKEY_HPP
00019 #define MS_PEPQUANTKEY_HPP
00020
00021
00022
00023 #include <string>
00024
00025 namespace matrix_science {
00031
00032
00068 class MS_MASCOTRESFILE_API ms_peptide_quant_key
00069 {
00070 public:
00072 ms_peptide_quant_key();
00073
00075 ms_peptide_quant_key(int q, int p);
00076
00078 ms_peptide_quant_key(int q, int p, int charge);
00079
00081 explicit ms_peptide_quant_key(int ID);
00082
00084 explicit ms_peptide_quant_key(const std::string &opaqueString);
00085
00087 explicit ms_peptide_quant_key(const std::string &opaqueString, int ID);
00088
00090 ms_peptide_quant_key(const ms_peptide_quant_key& src);
00091
00093 ~ms_peptide_quant_key();
00094
00095 #ifndef SWIG
00096
00097 ms_peptide_quant_key& operator=(const ms_peptide_quant_key& right);
00098
00100 bool operator<(const ms_peptide_quant_key& right) const;
00101
00103 bool operator<=(const ms_peptide_quant_key& right) const;
00104
00106 bool operator>(const ms_peptide_quant_key& right) const;
00107
00109 bool operator>=(const ms_peptide_quant_key& right) const;
00110
00112 bool operator==(const ms_peptide_quant_key& right) const;
00113
00115 bool operator!=(const ms_peptide_quant_key& right) const;
00116 #endif
00117
00118
00119 #ifndef SWIG
00120
00121 bool getQueryAndRank(int &q, int &p) const;
00122
00124 bool getCharge(int &charge) const;
00125
00127 bool getID(int &ID) const;
00128
00130 bool getOpaqueString(std::string & opaqueStringRef) const;
00131
00133 bool getOpaqueStringAndID(std::string & opaqueStringRef, int & ID) const;
00134 #else // SWIG Multiple return values
00135 bool getQueryAndRank(int & OUTPUT, int & OUTPUT) const;
00136 bool getCharge(int &OUTPUT) const;
00137 bool getID(int &OUTPUT) const;
00138 bool getOpaqueString(std::string & OUTPUT) const;
00139 bool getOpaqueStringAndID(std::string & OUTPUT, int & OUTPUT) const;
00140 #endif
00141
00143 bool isNil() const;
00144
00146 static ms_peptide_quant_key fromSerialisedString(const std::string &serialisedStr);
00147
00149 std::string serialise() const;
00150
00152 static std::string serialisationFormatVersion();
00153
00154 private:
00155 enum PEPQUANTKEY_TYPE {
00156 PEPQUANTKEY_NIL,
00157 PEPQUANTKEY_QP,
00158 PEPQUANTKEY_QPCHARGE,
00159 PEPQUANTKEY_ID,
00160 PEPQUANTKEY_OPAQUE,
00161 PEPQUANTKEY_OPAQUEID
00162 };
00163
00164 int type_, q_, p_, charge_, ID_;
00165 std::string *opaqueString_;
00166 };
00168 }
00169
00170 #endif // MS_PEPQUANTKEY_HPP
00171
00172