Matrix Science header

ms_peptide_quant_key.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_peptide_quant_key.hpp                                             #
00004 # 'msparser' toolkit                                                         #
00005 # Peptide quantitation key used in ms_quantitation                           #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2012 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #     $Author: davidc $ #
00012 #       $Date: 2015/07/31 15:48:07 $ #
00013 #   $Revision: #
00014 # $NoKeywords::                                                            $ #
00015 ##############################################################################
00016 */
00017 
00018 #ifndef MS_PEPQUANTKEY_HPP
00019 #define MS_PEPQUANTKEY_HPP
00020 
00021 #ifdef _WIN32
00022 #pragma warning(disable:4251)   // Don't want all classes to be exported
00023 #pragma warning(disable:4786)   // Debug symbols too long
00024 #   ifndef _MATRIX_USE_STATIC_LIB
00025 #       ifdef MS_MASCOTRESFILE_EXPORTS
00026 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00027 #       else
00028 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00029 #       endif
00030 #   else
00031 #       define MS_MASCOTRESFILE_API
00032 #   endif
00033 #else
00034 #   define MS_MASCOTRESFILE_API
00035 #endif
00036 
00037 // Includes from the standard template library
00038 #include <string>
00039 
00040 namespace matrix_science {
00046 
00047 
00083     class MS_MASCOTRESFILE_API ms_peptide_quant_key
00084     {
00085         public:
00087             ms_peptide_quant_key();
00088 
00090             ms_peptide_quant_key(int q, int p);
00091 
00093             ms_peptide_quant_key(int q, int p, int charge);
00094 
00096             explicit ms_peptide_quant_key(int ID);
00097 
00099             explicit ms_peptide_quant_key(const std::string &opaqueString);
00100 
00102             explicit ms_peptide_quant_key(const std::string &opaqueString, int ID);
00103 
00105             ms_peptide_quant_key(const ms_peptide_quant_key& src);
00106 
00108             ~ms_peptide_quant_key();
00109 
00110 #ifndef SWIG
00111 
00112             ms_peptide_quant_key& operator=(const ms_peptide_quant_key& right);
00113 
00115             bool operator<(const ms_peptide_quant_key& right) const;
00116 
00118             bool operator<=(const ms_peptide_quant_key& right) const;
00119 
00121             bool operator>(const ms_peptide_quant_key& right) const;
00122 
00124             bool operator>=(const ms_peptide_quant_key& right) const;
00125 
00127             bool operator==(const ms_peptide_quant_key& right) const;
00128 
00130             bool operator!=(const ms_peptide_quant_key& right) const;
00131 #endif
00132 
00134             bool getQueryAndRank(int &q, int &p) const;
00135 
00137             bool getCharge(int &charge) const;
00138 
00140             bool getID(int &ID) const;
00141 
00143             bool getOpaqueString(std::string & opaqueStringRef) const;
00144 
00146             bool getOpaqueStringAndID(std::string & opaqueStringRef, int & ID) const;
00147 
00149             bool isNil() const;
00150 
00152             static ms_peptide_quant_key fromSerialisedString(const std::string &serialisedStr);
00153 
00155             std::string serialise() const;
00156 
00158             static std::string serialisationFormatVersion();
00159 
00160         private:
00161             enum PEPQUANTKEY_TYPE {
00162                 PEPQUANTKEY_NIL,
00163                 PEPQUANTKEY_QP,
00164                 PEPQUANTKEY_QPCHARGE,
00165                 PEPQUANTKEY_ID,
00166                 PEPQUANTKEY_OPAQUE,
00167                 PEPQUANTKEY_OPAQUEID
00168             };
00169 
00170             int type_, q_, p_, charge_, ID_;
00171             std::string *opaqueString_;
00172     }; // end of quantitation_group
00174 }   // matrix_science namespace
00175 
00176 #endif // MS_PEPQUANTKEY_HPP
00177 
00178 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51