Matrix Science header

ms_umod_composition.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_umod_composition.hpp                                                #
00004 # 'msparser' toolkit                                                         #
00005 # Represents 'composition_t' type from unimod.xml file                       #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: parser/inc/ms_umod_composition.hpp $
00012  * @(#)$Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $
00013  * @(#)$Date: 2018-07-30 16:23:53 +0100 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_UMOD_COMPOSITION_HPP
00018 #define MS_UMOD_COMPOSITION_HPP
00019 
00020 
00021 #include <string>
00022 #include <vector>
00023 
00024 // forward declarations
00025 namespace msparser_internal {
00026     class ms_umod_xmlloader;
00027 }
00028 
00029 namespace matrix_science {
00030 
00031     class ms_umod_elemref; // forward declaration
00032     class ms_quant_composition; // forward declaration
00033     class ms_quant_component;  // forward declaration
00034     class ms_umod_configfile;  // forward declaration
00035     class ms_xml_schema; // forward declaration
00036 
00042 
00043 
00047     class MS_MASCOTRESFILE_API ms_umod_composition: public ms_xml_IValidatable
00048     {
00049         friend class msparser_internal::ms_umod_xmlloader;
00050         friend class ms_umod_configfile;
00051 
00052     public:
00054         ms_umod_composition();
00055 
00057         ms_umod_composition(const ms_umod_composition& src);
00058 
00060         ms_umod_composition(const ms_quant_composition& src, const ms_umod_configfile& umodFile);
00061 
00063         void updateMasses(const ms_umod_configfile& umodFile, const ms_quant_component& quantComp);
00064 
00066         virtual ~ms_umod_composition();
00067 
00069         void defaultValues();
00070 
00072         void copyFrom(const ms_umod_composition* right);
00073 
00075         void copyFrom(const ms_quant_composition* right, const ms_umod_configfile& umodFile);
00076 
00077 #ifndef SWIG
00078 
00079         ms_umod_composition& operator=(const ms_umod_composition& right);
00080 #endif
00081 
00082         virtual std::string getSchemaType() const;
00083 
00085         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00086 
00088         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00089 
00090 
00092         int getNumberOfElemRefs() const;
00093 
00095         void clearElemRefs();
00096 
00098         void appendElemRef(const ms_umod_elemref *elemref);
00099 
00101         const ms_umod_elemref* getElemRef(const int idx) const;
00102 
00104         bool updateElemRef(const int idx, const ms_umod_elemref *elemref);
00105 
00107         bool deleteElemRef(const int idx);
00108 
00110         std::string getElemRefSchemaType() const;
00111 
00112 
00114         bool haveCompositionString() const;
00115 
00117         std::string getCompositionString() const;
00118 
00120         void setCompositionString(const char* value);
00121 
00123         void dropCompositionString();
00124 
00126         std::string getCompositionStringSchemaType() const;
00127 
00128 
00130         bool haveAvgeMass() const;
00131 
00133         double getAvgeMass() const;
00134 
00136         void setAvgeMass(const double value);
00137 
00139         void dropAvgeMass();
00140 
00142         std::string getAvgeMassSchemaType() const;
00143 
00144 
00146         bool haveMonoMass() const;
00147 
00149         double getMonoMass() const;
00150 
00152         void setMonoMass(const double value);
00153 
00155         void dropMonoMass();
00156 
00158         std::string getMonoMassSchemaType() const;
00159 
00161         bool isSameAs(const ms_umod_composition& right) const;
00162 
00163     private:
00164 
00165         typedef std::vector< ms_umod_elemref* > elemref_vector;
00166         elemref_vector _elemRefs;
00167 
00168         std::string _composition;
00169         bool _composition_set;
00170 
00171         double _avgeMass;
00172         bool _avgeMass_set;
00173 
00174         double _monoMass;
00175         bool _monoMass_set;
00176     }; // class ms_umod_composition
00177  // end of config_group
00179 
00180 } // namespace matrix_science
00181 
00182 #endif // MS_UMOD_COMPOSITION_HPP
00183 
00184 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:30