Matrix Science header

ms_quant_component.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_quant_component.hpp                                               #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates component-element from "quantitation.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_quant_component.hpp,v $
00012  * @(#)$Revision: 1.11 $
00013  * @(#)$Date: 2010/09/06 16:18:57 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_QUANT_COMPONENT_HPP
00018 #define MS_QUANT_COMPONENT_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_quant_xmlloader;
00042 } 
00043 
00044 namespace matrix_science {
00045 
00046     class ms_quant_modgroup; // forward declaration
00047     class ms_quant_moverz; // forward declaration
00048     class ms_quant_correction; // forward declaration
00049     class ms_quant_isotope; // forward declaration
00050     class ms_quant_satellite; // forward declaration
00051     class ms_xml_schema; // forward declaration
00052 
00058 
00059 
00062     class MS_MASCOTRESFILE_API ms_quant_component: public ms_xml_IValidatable
00063     {
00064         friend class msparser_internal::ms_quant_xmlloader;
00065 
00066     public:
00068         ms_quant_component();
00069 
00071         ms_quant_component(const ms_quant_component& src);
00072 
00074         virtual ~ms_quant_component();
00075 
00077         void defaultValues();
00078 
00080         void copyFrom(const ms_quant_component* right);
00081 
00082 #ifndef SWIG
00083 
00084         ms_quant_component& operator=(const ms_quant_component& right);
00085 #endif
00086 
00088         virtual std::string getSchemaType() const;
00089 
00091         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00092 
00094         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00095 
00096 
00098         bool haveMoverz() const;
00099 
00101         const ms_quant_moverz* getMoverz() const;
00102 
00104         void setMoverz(const ms_quant_moverz* moverz);
00105 
00107         void dropMoverz();
00108 
00110         std::string getMoverzSchemaType() const;
00111 
00112 
00114         int getNumberOfModificationGroups() const;
00115 
00117         void clearModificationGroups();
00118 
00120         void appendModificationGroup(const ms_quant_modgroup *item);
00121 
00123         const ms_quant_modgroup * getModificationGroupByNumber(const int idx) const;
00124 
00126         const ms_quant_modgroup * getModificationGroupByName(const char *name) const;
00127 
00129         bool updateModificationGroupByNumber(const int idx, const ms_quant_modgroup* modgroup);
00130 
00132         bool updateModificationGroupByName(const char *name, const ms_quant_modgroup* modgroup);
00133 
00135         bool deleteModificationGroupByNumber(const int idx);
00136 
00138         bool deleteModificationGroupByName(const char *name);
00139 
00141         std::string getModificationGroupSchemaType() const;
00142 
00143 
00145         int getNumberOfIsotopes() const;
00146 
00148         void clearIsotopes();
00149 
00151         void appendIsotope(const ms_quant_isotope* isotope);
00152 
00154         const ms_quant_isotope* getIsotope(const int idx) const;
00155 
00157         bool updateIsotope(const int idx, const ms_quant_isotope* isotope);
00158 
00160         bool deleteIsotope(const int idx);
00161 
00163         std::string getIsotopeSchemaType() const;
00164 
00165 
00166 
00168         bool haveFileIndex() const;
00169 
00171         int getFileIndex() const;
00172 
00174         void setFileIndex(const int file_index);
00175 
00177         void dropFileIndex();
00178 
00180         std::string getFileIndexSchemaType() const;
00181 
00182 
00184         int getNumberOfCorrections() const;
00185 
00187         void clearCorrections();
00188 
00190         void appendCorrection(const ms_quant_correction* correction);
00191 
00193         const ms_quant_correction* getCorrection(const int idx) const;
00194 
00196         bool updateCorrection(const int idx, const ms_quant_correction* isotope);
00197 
00199         bool deleteCorrection(const int idx);
00200 
00202         std::string getCorrectionSchemaType() const;
00203 
00204 
00206         bool haveName() const;
00207 
00209         std::string getName() const;
00210 
00212         void setName(const char* value);
00213 
00215         void dropName();
00216 
00218         std::string getNameSchemaType() const;
00219 
00220 
00222         bool haveSatellite() const;
00223 
00225         const ms_quant_satellite* getSatellite() const;
00226 
00228         void setSatellite(const ms_quant_satellite* satellite);
00229 
00231         void dropSatellite();
00232 
00234         std::string getSatelliteSchemaType() const;
00235 
00236     private:
00237         // elements
00238         ms_quant_moverz *_pMoverz;
00239         bool _moverz_set;
00240 
00241         typedef std::vector< ms_quant_modgroup* > modgroup_vector;
00242         modgroup_vector _modgroups;
00243 
00244         typedef std::vector< ms_quant_isotope* > isotope_vector;
00245         isotope_vector _isotopes;
00246 
00247         int _fileIndex;
00248         bool _fileIndex_set;
00249 
00250         typedef std::vector< ms_quant_correction* > correction_vector;
00251         correction_vector _corrections;
00252 
00253         // attributes
00254         std::string _name;
00255         bool _name_set;
00256 
00257         ms_quant_satellite *_pSatellite;
00258         bool _satellite_set;
00259     }; // class ms_quant_component
00260  // end of config_group
00262 
00263 } // namespace matrix_science
00264 
00265 #endif // MS_QUANT_COMPONENT_HPP
00266 
00267 /*------------------------------- End of File -------------------------------*/
00268 
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51