Matrix Science header

ms_quant_composition.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_quant_composition.hpp                                             #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates "compositionType" from "quantitation.xml"-file                #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: parser/inc/ms_quant_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_QUANT_COMPOSITION_HPP
00018 #define MS_QUANT_COMPOSITION_HPP
00019 
00020 
00021 #include <string>
00022 #include <vector>
00023 
00024 // forward declarations
00025 namespace msparser_internal {
00026     class ms_quant_xmlloader;
00027 }
00028 
00029 namespace matrix_science {
00030 
00031     class ms_xml_schema; // forward declaration
00032 
00038 
00039     class MS_MASCOTRESFILE_API ms_quant_element: public ms_xml_IValidatable
00040     {
00041         friend class msparser_internal::ms_quant_xmlloader;
00042 
00043     public:
00045         ms_quant_element();
00046 
00048         ms_quant_element(const ms_quant_element& src);
00049 
00051         virtual ~ms_quant_element();
00052 
00054         void defaultValues();
00055 
00057         void copyFrom(const ms_quant_element* right);
00058 
00059 #ifndef SWIG
00060 
00061         ms_quant_element& operator=(const ms_quant_element& right);
00062 #endif
00063         
00065         virtual std::string getSchemaType() const;
00066 
00068         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00069 
00071         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00072 
00073 
00075         bool haveSymbol() const;
00076 
00078         std::string getSymbol() const;
00079 
00081         void setSymbol(const char* symbol);
00082 
00084         void dropSymbol();
00085 
00087         std::string getSymbolSchemaType() const;
00088 
00089         
00091         bool haveNumber() const;
00092 
00094         int getNumber() const;
00095 
00097         void setNumber(const int number);
00098 
00100         void dropNumber();
00101 
00103         std::string getNumberSchemaType() const;
00104 
00105 
00106     private:
00107         std::string _symbol;
00108         bool _symbol_set;
00109 
00110         int _number;
00111         bool _number_set;
00112 
00113     }; // class ms_quant_element
00114 
00116 
00119     class MS_MASCOTRESFILE_API ms_quant_composition: public ms_xml_IValidatable
00120     {
00121         friend class msparser_internal::ms_quant_xmlloader;
00122     public:
00124         ms_quant_composition();
00125 
00127         ms_quant_composition(const ms_quant_composition& src);
00128 
00130         virtual ~ms_quant_composition();
00131 
00133         void defaultValues();
00134 
00136         void copyFrom(const ms_quant_composition* right);
00137 
00138 #ifndef SWIG
00139 
00140         ms_quant_composition& operator=(const ms_quant_composition& right);
00141 #endif
00142 
00143         virtual std::string getSchemaType() const;
00144 
00146         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00147 
00149         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00150 
00151 
00153         int getNumberOfElements() const;
00154 
00156         void clearElements();
00157 
00159         void appendElement(const ms_quant_element *element);
00160 
00162         const ms_quant_element * getElement(const int idx) const;
00163 
00165         bool updateElement(const int idx, const ms_quant_element* element);
00166 
00168         bool deleteElement(const int idx);
00169 
00171         std::string getElementSchemaType() const;
00172 
00173     private:
00174         typedef std::vector< ms_quant_element* > element_vector;
00175         element_vector _elements;
00176 
00177     }; // class ms_quant_composition
00178  // end of config_group
00180 
00181 } // namespace matrix_science
00182 
00183 #endif // MS_QUANT_COMPOSITION_HPP
00184 
00185 /*------------------------------- End of File -------------------------------*/

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