00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef MS_QUANT_RATIO_HPP
00018 #define MS_QUANT_RATIO_HPP
00019
00020
00021 #include <string>
00022 #include <vector>
00023
00024
00025 namespace msparser_internal {
00026 class ms_quant_xmlloader;
00027 }
00028
00029 namespace matrix_science {
00030
00031 class ms_quant_numerator;
00032 class ms_xml_schema;
00033
00039
00040 class MS_MASCOTRESFILE_API ms_quant_ratio: public ms_xml_IValidatable
00041 {
00042 friend class msparser_internal::ms_quant_xmlloader;
00043
00044 public:
00046 ms_quant_ratio();
00047
00049 ms_quant_ratio(const ms_quant_ratio& src);
00050
00052 virtual ~ms_quant_ratio();
00053
00055 void defaultValues();
00056
00058 void copyFrom(const ms_quant_ratio* right);
00059
00060 #ifndef SWIG
00061
00062 ms_quant_ratio& operator=(const ms_quant_ratio& right);
00063 #endif
00064
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 int getNumberOfNumerators() const;
00076
00078 void clearNumerators();
00079
00081 void appendNumerator(const ms_quant_numerator *numerator);
00082
00084 const ms_quant_numerator * getNumeratorByNumber(const int idx) const;
00085
00087 const ms_quant_numerator * getNumeratorByName(const char *name) const;
00088
00090 bool updateNumeratorByNumber(const int idx, const ms_quant_numerator* numerator);
00091
00093 bool updateNumeratorByName(const char *name, const ms_quant_numerator* numerator);
00094
00096 bool deleteNumeratorByNumber(const int idx);
00097
00099 bool deleteNumeratorByName(const char *name);
00100
00102 std::string getNumeratorSchemaType() const;
00103
00104
00106 int getNumberOfDenominators() const;
00107
00109 void clearDenominators();
00110
00112 void appendDenominator(const ms_quant_numerator *denominator);
00113
00115 const ms_quant_numerator * getDenominatorByNumber(const int idx) const;
00116
00118 const ms_quant_numerator * getDenominatorByName(const char *name) const;
00119
00121 bool updateDenominatorByNumber(const int idx, const ms_quant_numerator* denominator);
00122
00124 bool updateDenominatorByName(const char *name, const ms_quant_numerator* denominator);
00125
00127 bool deleteDenominatorByNumber(const int idx);
00128
00130 bool deleteDenominatorByName(const char *name);
00131
00133 std::string getDenominatorSchemaType() const;
00134
00135
00137 bool haveName() const;
00138
00140 std::string getName() const;
00141
00143 void setName(const char* value);
00144
00146 void dropName();
00147
00149 std::string getNameSchemaType() const;
00150
00151 private:
00152 typedef std::vector< ms_quant_numerator* > numerator_vector;
00153 numerator_vector _numerators;
00154
00155 numerator_vector _denominators;
00156
00157 std::string _name;
00158 bool _name_set;
00159
00160 };
00161
00163
00164 }
00165
00166 #endif // MS_QUANT_RATIO_HPP
00167
00168