Matrix Science header

ms_umod_specificity.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_umod_specificity.hpp                                              #
00004 # 'msparser' toolkit                                                         #
00005 # Represents 'specificity' object from unimod.xml file                       #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: /vol/cvsroot/parser/inc/ms_umod_specificity.hpp,v $
00012  * @(#)$Revision: 1.11 $
00013  * @(#)$Date: 2016/05/25 12:57:48 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_UMOD_SPECIFICITY_HPP
00018 #define MS_UMOD_SPECIFICITY_HPP
00019 
00020 #ifdef _WIN32
00021 #pragma warning(disable:4251)   // Don't want all classes to be exported
00022 #pragma warning(disable:4786)   // Debug symbols too long
00023 #   ifndef _MATRIX_USE_STATIC_LIB
00024 #       ifdef MS_MASCOTRESFILE_EXPORTS
00025 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00026 #       else
00027 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00028 #       endif
00029 #   else
00030 #       define MS_MASCOTRESFILE_API
00031 #   endif
00032 #else
00033 #   define MS_MASCOTRESFILE_API
00034 #endif
00035 
00036 #include <string>
00037 #include <vector>
00038 
00039 // forward declarations
00040 namespace msparser_internal {
00041     class ms_umod_xmlloader;
00042 }
00043 
00044 namespace matrix_science {
00045 
00046     class ms_umod_neutralloss; // forward declaration
00047     class ms_quant_specificity; // forward declaration
00048     class ms_umod_configfile;  // forward declaration
00049     class ms_xml_schema; // forward declaration
00050 
00056 
00057     class MS_MASCOTRESFILE_API ms_umod_specificity
00058     {
00059         friend class msparser_internal::ms_umod_xmlloader;
00060         friend class ms_umod_modification;
00061         friend class ms_umod_configfile;
00062 
00063     public:
00065         ms_umod_specificity();
00066 
00068         ms_umod_specificity(const ms_umod_specificity& src);
00069 
00071         ms_umod_specificity(const ms_quant_specificity& src, const ms_umod_configfile& umodFile);
00072 
00074         virtual ~ms_umod_specificity();
00075 
00077         void defaultValues();
00078 
00080         void copyFrom(const ms_umod_specificity* right);
00081 
00083         void copyFrom(const ms_quant_specificity* right, const ms_umod_configfile& umodFile);
00084 
00085 #ifndef SWIG
00086 
00087         ms_umod_specificity& operator=(const ms_umod_specificity& right);
00088 #endif
00089 
00090         virtual std::string getSchemaType() const;
00091 
00093         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00094 
00096         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00097 
00098 
00100         int getNumberOfNeutralLosses() const;
00101 
00103         void clearNeutralLosses();
00104 
00106         void appendNeutralLoss(const ms_umod_neutralloss *nl);
00107 
00109         const ms_umod_neutralloss* getNeutralLoss(const int idx) const;
00110 
00112         bool updateNeutralLoss(const int idx, const ms_umod_neutralloss *nl);
00113 
00115         bool deleteNeutralLoss(const int idx);
00116 
00118         std::string getNeutralLossSchemaType() const;
00119 
00120 
00122         int getNumberOfPepNeutralLosses() const;
00123 
00125         void clearPepNeutralLosses();
00126 
00128         void appendPepNeutralLoss(const ms_umod_neutralloss *pnl);
00129 
00131         const ms_umod_neutralloss* getPepNeutralLoss(const int idx) const;
00132 
00134         bool updatePepNeutralLoss(const int idx, const ms_umod_neutralloss *pnl);
00135 
00137         bool deletePepNeutralLoss(const int idx);
00138 
00140         std::string getPepNeutralLossSchemaType() const;
00141 
00142 
00144         bool haveMiscNotes() const;
00145 
00147         std::string getMiscNotes() const;
00148 
00150         void setMiscNotes(const char* value);
00151 
00153         void dropMiscNotes();
00154 
00156         std::string getMiscNotesSchemaType() const;
00157 
00158 
00160         bool haveHidden() const;
00161 
00163         bool isHidden() const;
00164 
00166         void setHidden(const bool value);
00167 
00169         void dropHidden();
00170 
00172         std::string getHiddenSchemaType() const;
00173 
00174 
00176         bool haveSite() const;
00177 
00179         std::string getSite() const;
00180 
00182         void setSite(const char* value);
00183 
00185         void dropSite();
00186 
00188         std::string getSiteSchemaType() const;
00189 
00190 
00192         bool havePosition() const;
00193 
00195         std::string getPosition() const;
00196 
00198         void setPosition(const char* value);
00199 
00201         void dropPosition();
00202 
00204         std::string getPositionSchemaType() const;
00205 
00206 
00208         bool haveClassification() const;
00209 
00211         std::string getClassification() const;
00212 
00214         void setClassification(const char* value);
00215 
00217         void dropClassification();
00218 
00220         std::string getClassificationSchemaType() const;
00221 
00222 
00224         bool haveSpecGroup() const;
00225 
00227         int getSpecGroup() const;
00228 
00230         void setSpecGroup(const int value);
00231 
00233         void dropSpecGroup();
00234 
00236         std::string getSpecGroupSchemaType() const;
00237 
00239         bool inShortList() const;
00240 
00241         // ! Sets whether this specificity is in the short list on the Mascot search form.
00242         void showInShortList(bool b);
00243 
00245         bool inLongList() const;
00246 
00247         // ! Sets whether this specificity is in the full list on the Mascot search form.
00248         void showInLongList(bool b);
00249 
00250         // ! Indicates if this specificity is included in error tolerant searches.
00251         bool inErrorTolerant() const;
00252 
00253         // ! Sets if this specificity is included in error tolerant searches.
00254         void useInErrorTolerant(bool b);
00255 
00257         bool isSameAs(const ms_umod_specificity& right) const;
00258 
00259     private:
00260 
00261         typedef std::vector< ms_umod_neutralloss* > nl_vector;
00262         nl_vector _neutrallosses;
00263 
00264         typedef std::vector< ms_umod_neutralloss* > pnl_vector;
00265         pnl_vector _pepneutrallosses;
00266 
00267         std::string _miscNotes;
00268         bool _miscNotes_set;
00269 
00270         bool _hidden;
00271         bool _hidden_set;
00272 
00273         std::string _site;
00274         bool _site_set;
00275 
00276         std::string _position;
00277         bool _position_set;
00278 
00279         std::string _classification;
00280         bool _classification_set;
00281 
00282         int _specGroup;
00283         bool _specGroup_set;
00284 
00285         // Not persistent in unimod xml files
00286         bool _show_in_long_list;
00287         bool _use_in_error_tolerant;
00288 
00289     }; // class ms_umod_specificity
00290  // end of config_group
00292 
00293 } // namespace matrix_science
00294 
00295 #endif // MS_UMOD_SPECIFICITY_HPP
00296 
00297 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51