Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_umod_composition.hpp
1/*
2##############################################################################
3# file: ms_umod_composition.hpp #
4# 'msparser' toolkit #
5# Represents 'composition_t' type from unimod.xml file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2006 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11 * @(#)$Source: parser/inc/ms_umod_composition.hpp $
12 * @(#)$Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $
13 * @(#)$Date: 2018-07-30 16:23:53 +0100 $
14##############################################################################
15 */
16
17#ifndef MS_UMOD_COMPOSITION_HPP
18#define MS_UMOD_COMPOSITION_HPP
19
20
21#include <string>
22#include <vector>
23
24// forward declarations
25namespace msparser_internal {
26 class ms_umod_xmlloader;
27}
28
29namespace matrix_science {
30
31 class ms_umod_elemref; // forward declaration
32 class ms_quant_composition; // forward declaration
33 class ms_quant_component; // forward declaration
34 class ms_umod_configfile; // forward declaration
35 class ms_xml_schema; // forward declaration
36
43
47 class MS_MASCOTRESFILE_API ms_umod_composition: public ms_xml_IValidatable
48 {
49 friend class msparser_internal::ms_umod_xmlloader;
50 friend class ms_umod_configfile;
51
52 public:
55
58
61
63 void updateMasses(const ms_umod_configfile& umodFile, const ms_quant_component& quantComp);
64
66 virtual ~ms_umod_composition();
67
69 void defaultValues();
70
72 void copyFrom(const ms_umod_composition* right);
73
75 void copyFrom(const ms_quant_composition* right, const ms_umod_configfile& umodFile);
76
77#ifndef SWIG
79 ms_umod_composition& operator=(const ms_umod_composition& right);
80#endif
82 virtual std::string getSchemaType() const;
83
85 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
86
88 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
89
90
92 int getNumberOfElemRefs() const;
93
95 void clearElemRefs();
96
98 void appendElemRef(const ms_umod_elemref *elemref);
99
101 const ms_umod_elemref* getElemRef(const int idx) const;
102
104 bool updateElemRef(const int idx, const ms_umod_elemref *elemref);
105
107 bool deleteElemRef(const int idx);
108
110 std::string getElemRefSchemaType() const;
111
112
114 bool haveCompositionString() const;
115
117 std::string getCompositionString() const;
118
120 void setCompositionString(const char* value);
121
123 void dropCompositionString();
124
126 std::string getCompositionStringSchemaType() const;
127
128
130 bool haveAvgeMass() const;
131
133 double getAvgeMass() const;
134
136 void setAvgeMass(const double value);
137
139 void dropAvgeMass();
140
142 std::string getAvgeMassSchemaType() const;
143
144
146 bool haveMonoMass() const;
147
149 double getMonoMass() const;
150
152 void setMonoMass(const double value);
153
155 void dropMonoMass();
156
158 std::string getMonoMassSchemaType() const;
159
161 bool isSameAs(const ms_umod_composition& right) const;
162
163 private:
164
165 typedef std::vector< ms_umod_elemref* > elemref_vector;
166 elemref_vector _elemRefs;
167
168 std::string _composition;
169 bool _composition_set;
170
171 double _avgeMass;
172 bool _avgeMass_set;
173
174 double _monoMass;
175 bool _monoMass_set;
176 }; // class ms_umod_composition
177 // end of config_group
179
180} // namespace matrix_science
181
182#endif // MS_UMOD_COMPOSITION_HPP
183
184/*------------------------------- End of File -------------------------------*/
An object of this class represent a single component element in quantitation.xml.
Definition: ms_quant_component.hpp:48
Describes the compositionType type in quantitation.xml.
Definition: ms_quant_composition.hpp:120
Represents the composition type in unimod.xml.
Definition: ms_umod_composition.hpp:48
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54
Represents the elemref_t type in unimod.xml.
Definition: ms_umod_elemref.hpp:45