Matrix Science header

ms_umod_modification.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_umod_modification.hpp                                             #
00004 # 'msparser' toolkit                                                         #
00005 # Represents modification object in 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_modification.hpp,v $
00012  * @(#)$Revision: 1.15 $
00013  * @(#)$Date: 2016/05/25 12:57:48 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_UMOD_MODIFICATION_HPP
00018 #define MS_UMOD_MODIFICATION_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_composition; // forward declaration
00047     class ms_umod_specificity;  // forward declaration
00048     class ms_umod_xref; // forward declaration
00049     class ms_quant_localdef; // forward declaration
00050     class ms_quant_unmodified;  // forward declaration
00051     class ms_umod_configfile; // forward declaration
00052     class ms_quant_component; // forward declaration
00053     class ms_xml_schema; // forward declaration
00054 
00060 
00061     class MS_MASCOTRESFILE_API ms_umod_modification: public ms_xml_IValidatable
00062     {
00063         friend class msparser_internal::ms_umod_xmlloader;
00064         friend class ms_umod_configfile;
00065 
00066     public:
00068         ms_umod_modification();
00069 
00071         ms_umod_modification(const ms_umod_modification& src);
00072 
00074         ms_umod_modification(const ms_quant_localdef& src, const ms_umod_configfile& umodFile);
00075 
00077         ms_umod_modification(const ms_quant_unmodified& src);
00078 
00080         void updateMasses(const ms_umod_configfile& umodFile, const ms_quant_component& quantComp);
00081 
00083         virtual ~ms_umod_modification();
00084 
00086         void defaultValues();
00087 
00089         void copyFrom(const ms_umod_modification* right);
00090 
00092         void copyFrom(const ms_quant_localdef* right, const ms_umod_configfile& umodFile);
00093 
00095         void copyFrom(const ms_quant_unmodified* right);
00096 
00097 #ifndef SWIG
00098 
00099         ms_umod_modification& operator=(const ms_umod_modification& right);
00100 #endif
00101 
00103         bool isSameAs(const ms_umod_modification& right_mod) const;
00104 
00106         virtual std::string getSchemaType() const;
00107 
00109         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00110 
00112         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00113 
00114 
00116         std::vector< std::string > getModFileList(const unsigned int flags = ms_umod_configfile::MODFILE_FLAGS_ALL) const;
00117 
00119         int findSpecGroup(const char* modFileName) const;
00120 
00122         int getNumberOfSpecificities() const;
00123 
00125         void clearSpecificities();
00126 
00128         void appendSpecificity(const ms_umod_specificity *specificity);
00129 
00131         const ms_umod_specificity * getSpecificity(const int idx) const;
00132 
00134         const ms_umod_specificity * getSpecificityBySite(const char *site) const;
00135 
00137         const ms_umod_specificity * getSpecificityBySiteAndPosition(const char *site, const char *position) const;
00138 
00140         bool updateSpecificity(const int idx, const ms_umod_specificity *specificity);
00141 
00143         bool deleteSpecificity(const int idx);
00144 
00146         std::string getSpecificitySchemaType() const;
00147 
00148 
00150         bool haveDelta() const;
00151 
00153         const ms_umod_composition* getDelta() const;
00154 
00156         void setDelta(const ms_umod_composition* delta);
00157 
00159         void dropDelta();
00160 
00162         std::string getDeltaSchemaType() const;
00163 
00164 
00166         int getNumberOfIgnores() const;
00167 
00169         void clearIgnores();
00170 
00172         void appendIgnore(const ms_umod_composition *ignore);
00173 
00175         const ms_umod_composition * getIgnore(const int idx) const;
00176 
00178         bool updateIgnore(const int idx, const ms_umod_composition *ignore);
00179 
00181         bool deleteIgnore(const int idx);
00182 
00184         std::string getIgnoreSchemaType() const;
00185 
00186 
00188         int getNumberOfAltNames() const;
00189 
00191         void clearAltNames();
00192 
00194         void appendAltName(const char *alt_name);
00195 
00197         std::string getAltName(const int idx) const;
00198 
00200         bool updateAltName(const int idx, const char *alt_name);
00201 
00203         bool deleteAltName(const int idx);
00204 
00206         std::string getAltNameSchemaType() const;
00207 
00208 
00210         int getNumberOfXrefs() const;
00211 
00213         void clearXrefs();
00214 
00216         void appendXref(const ms_umod_xref *xref);
00217 
00219         const ms_umod_xref* getXref(const int idx) const;
00220 
00222         bool updateXref(const int idx, const ms_umod_xref *xref);
00223 
00225         bool deleteXref(const int idx);
00226 
00228         std::string getXrefSchemaType() const;
00229 
00230 
00232         bool haveMiscNotes() const;
00233 
00235         std::string getMiscNotes() const;
00236 
00238         void setMiscNotes(const char* value);
00239 
00241         void dropMiscNotes();
00242 
00244         std::string getMiscNotesSchemaType() const;
00245 
00246 
00248         bool haveTitle() const;
00249 
00251         std::string getTitle() const;
00252 
00254         void setTitle(const char* value);
00255 
00257         void dropTitle();
00258 
00260         std::string getTitleSchemaType() const;
00261 
00262 
00264         bool haveFullName() const;
00265 
00267         std::string getFullName() const;
00268 
00270         void setFullName(const char* value);
00271 
00273         void dropFullName();
00274 
00276         std::string getFullNameSchemaType() const;
00277 
00278 
00280         bool haveApproved() const;
00281 
00283         bool isApproved() const;
00284 
00286         void setApproved(const bool value);
00287 
00289         void dropApproved();
00290 
00292         std::string getApprovedSchemaType() const;
00293 
00294 
00296         bool haveUsernameOfPoster() const;
00297 
00299         std::string getUsernameOfPoster() const;
00300 
00302         void setUsernameOfPoster(const char* value);
00303 
00305         void dropUsernameOfPoster();
00306 
00308         std::string getUsernameOfPosterSchemaType() const;
00309 
00310 
00312         bool haveGroupOfPoster() const;
00313 
00315         std::string getGroupOfPoster() const;
00316 
00318         void setGroupOfPoster(const char* value);
00319 
00321         void dropGroupOfPoster();
00322 
00324         std::string getGroupOfPosterSchemaType() const;
00325 
00326 
00328         bool haveDateTimePosted() const;
00329 
00331         std::string getDateTimePosted() const;
00332 
00334         void setDateTimePosted(const char* value);
00335 
00337         void dropDateTimePosted();
00338 
00340         std::string getDateTimePostedSchemaType() const;
00341 
00342 
00344         bool haveDateTimeModified() const;
00345 
00347         std::string getDateTimeModified() const;
00348 
00350         void setDateTimeModified(const char* value);
00351 
00353         void dropDateTimeModified();
00354 
00356         std::string getDateTimeModifiedSchemaType() const;
00357 
00359         bool haveRecordID() const;
00360 
00362         std::string getRecordID() const;
00363 
00365         void setRecordID(const char* value);
00366 
00368         void dropRecordID();
00369 
00371         std::string getRecordIDSchemaType() const;
00372 
00374         bool isPrivate() const;
00375 
00377         void setPrivate(bool b);
00378 
00380         bool isPrivacyEnabled() const;
00381 
00383         void setPrivacyEnabled(bool b);
00384 
00385     private:
00386 
00387         typedef std::vector< ms_umod_specificity * > specificity_vector;
00388         specificity_vector _specificities;
00389 
00390         ms_umod_composition* _delta;
00391         bool _delta_set;
00392 
00393         typedef std::vector< ms_umod_composition* > ignore_vector;
00394         ignore_vector _ignores;
00395 
00396         typedef std::vector< std::string > altNames_vector;
00397         altNames_vector _altnames;
00398 
00399         typedef std::vector< ms_umod_xref* > xref_vector;
00400         xref_vector _xrefs;
00401 
00402         std::string _miscNotes;
00403         bool _miscNotes_set;
00404 
00405         std::string _title;
00406         bool _title_set;
00407 
00408         std::string _fullName;
00409         bool _fullName_set;
00410 
00411         bool _approved;
00412         bool _approved_set;
00413 
00414         std::string _usernameOfPoster;
00415         bool _usernameOfPoster_set;
00416 
00417         std::string _groupOfPoster;
00418         bool _groupOfPoster_set;
00419 
00420         std::string _dateTimePosted;
00421         bool _dateTimePosted_set;
00422 
00423         std::string _dateTimeModified;
00424         bool _dateTimeModified_set;
00425 
00426         std::string _recordID;
00427         bool _recordID_set;
00428 
00429         bool _isPrivate;
00430         bool _isPrivacyEnabled;
00431 
00432     }; // class ms_umod_modification
00433  // end of config_group
00435 
00436 } // namespace matrix_science
00437 
00438 #endif // MS_UMOD_MODIFICATION_HPP
00439 
00440 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51