Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_quant_component.hpp
1/*
2##############################################################################
3# file: ms_quant_component.hpp #
4# 'msparser' toolkit #
5# Encapsulates component-element from "quantitation.xml"-file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2006 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11 * @(#)$Source: parser/inc/ms_quant_component.hpp $
12 * @(#)$Revision: b16aae2ec68e22e8ed391e0142135bc5ee360bea | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $
13 * @(#)$Date: 2021-10-18 13:38:36 +0100 $
14##############################################################################
15 */
16
17#ifndef MS_QUANT_COMPONENT_HPP
18#define MS_QUANT_COMPONENT_HPP
19
20
21#include <string>
22#include <vector>
23
24// forward declarations
25namespace msparser_internal {
26 class ms_quant_xmlloader;
27}
28
29namespace matrix_science {
30
31 class ms_quant_modgroup; // forward declaration
32 class ms_quant_moverz; // forward declaration
33 class ms_quant_correction; // forward declaration
34 class ms_quant_isotope; // forward declaration
35 class ms_quant_satellite; // forward declaration
36 class ms_xml_schema; // forward declaration
37
44
47 class MS_MASCOTRESFILE_API ms_quant_component: public ms_xml_IValidatable
48 {
49 friend class msparser_internal::ms_quant_xmlloader;
50
51 public:
54
57
59 virtual ~ms_quant_component();
60
62 void defaultValues();
63
65 void copyFrom(const ms_quant_component* right);
66
67#ifndef SWIG
69 ms_quant_component& operator=(const ms_quant_component& right);
70#endif
71
73 virtual std::string getSchemaType() const;
74
76 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
77
79 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
80
81
83 bool haveMoverz() const;
84
86 const ms_quant_moverz* getMoverz() const;
87
89 void setMoverz(const ms_quant_moverz* moverz);
90
92 void dropMoverz();
93
95 std::string getMoverzSchemaType() const;
96
97
99 int getNumberOfModificationGroups() const;
100
102 void clearModificationGroups();
103
105 void appendModificationGroup(const ms_quant_modgroup *item);
106
108 const ms_quant_modgroup * getModificationGroupByNumber(const int idx) const;
109
111 const ms_quant_modgroup * getModificationGroupByName(const char *name) const;
112
114 bool updateModificationGroupByNumber(const int idx, const ms_quant_modgroup* modgroup);
115
117 bool updateModificationGroupByName(const char *name, const ms_quant_modgroup* modgroup);
118
120 bool deleteModificationGroupByNumber(const int idx);
121
123 bool deleteModificationGroupByName(const char *name);
124
126 std::string getModificationGroupSchemaType() const;
127
128
130 int getNumberOfIsotopes() const;
131
133 void clearIsotopes();
134
136 void appendIsotope(const ms_quant_isotope* isotope);
137
139 const ms_quant_isotope* getIsotope(const int idx) const;
140
142 bool updateIsotope(const int idx, const ms_quant_isotope* isotope);
143
145 bool deleteIsotope(const int idx);
146
148 std::string getIsotopeSchemaType() const;
149
150
151
153 bool haveFileIndex() const;
154
156 int getFileIndex() const;
157
159 void setFileIndex(const int file_index);
160
162 void dropFileIndex();
163
165 std::string getFileIndexSchemaType() const;
166
168 int getNumberOfFileIndexes() const;
169
171 void clearFileIndexes();
172
174 void appendFileIndex(const ms_quant_file_index * file_index);
175
177 const ms_quant_file_index* getFileIndex(const int idx) const;
178
180 bool updateFileIndex(const int idx, const ms_quant_file_index * file_index);
181
183 bool deleteFileIndex(const int idx);
184
185
187 int getNumberOfCorrections() const;
188
190 void clearCorrections();
191
193 void appendCorrection(const ms_quant_correction* correction);
194
196 const ms_quant_correction* getCorrection(const int idx) const;
197
199 bool updateCorrection(const int idx, const ms_quant_correction* isotope);
200
202 bool deleteCorrection(const int idx);
203
205 std::string getCorrectionSchemaType() const;
206
207
209 bool haveName() const;
210
212 std::string getName() const;
213
215 void setName(const char* value);
216
218 void dropName();
219
221 std::string getNameSchemaType() const;
222
223
225 bool haveSatellite() const;
226
228 const ms_quant_satellite* getSatellite() const;
229
231 void setSatellite(const ms_quant_satellite* satellite);
232
234 void dropSatellite();
235
237 std::string getSatelliteSchemaType() const;
238
239 private:
240 // elements
241 ms_quant_moverz *_pMoverz;
242 bool _moverz_set;
243
244 typedef std::vector< ms_quant_modgroup* > modgroup_vector;
245 modgroup_vector _modgroups;
246
247 typedef std::vector< ms_quant_isotope* > isotope_vector;
248 isotope_vector _isotopes;
249
250 typedef std::vector< ms_quant_file_index *> file_index_vector;
251 file_index_vector _file_indexes;
252
253 typedef std::vector< ms_quant_correction* > correction_vector;
254 correction_vector _corrections;
255
256 // attributes
257 std::string _name;
258 bool _name_set;
259
260 ms_quant_satellite *_pSatellite;
261 bool _satellite_set;
262 }; // class ms_quant_component
263 // end of config_group
265
266} // namespace matrix_science
267
268#endif // MS_QUANT_COMPONENT_HPP
269
270/*------------------------------- End of File -------------------------------*/
271
An object of this class represent a single component element in quantitation.xml.
Definition: ms_quant_component.hpp:48
Represents a correction element.
Definition: ms_quant_correction.hpp:40
Represents a file_index element.
Definition: ms_quant_file_index.hpp:52
Represents an isotope element.
Definition: ms_quant_isotope.hpp:40
An object of this class represent a single modification group element in quantitation....
Definition: ms_quant_modgroup.hpp:46
Parameter name and value pair.
Definition: ms_quant_moverz.hpp:39
An object of this class represent a single satellite element in quantitation.xml.
Definition: ms_quant_satellite.hpp:45