Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_quant_composition.hpp
1/*
2##############################################################################
3# file: ms_quant_composition.hpp #
4# 'msparser' toolkit #
5# Encapsulates "compositionType" 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_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_QUANT_COMPOSITION_HPP
18#define MS_QUANT_COMPOSITION_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_xml_schema; // forward declaration
32
39 class MS_MASCOTRESFILE_API ms_quant_element: public ms_xml_IValidatable
40 {
41 friend class msparser_internal::ms_quant_xmlloader;
42
43 public:
46
49
51 virtual ~ms_quant_element();
52
54 void defaultValues();
55
57 void copyFrom(const ms_quant_element* right);
58
59#ifndef SWIG
61 ms_quant_element& operator=(const ms_quant_element& right);
62#endif
63
65 virtual std::string getSchemaType() const;
66
68 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
69
71 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
72
73
75 bool haveSymbol() const;
76
78 std::string getSymbol() const;
79
81 void setSymbol(const char* symbol);
82
84 void dropSymbol();
85
87 std::string getSymbolSchemaType() const;
88
89
91 bool haveNumber() const;
92
94 int getNumber() const;
95
97 void setNumber(const int number);
98
100 void dropNumber();
101
103 std::string getNumberSchemaType() const;
104
105
106 private:
107 std::string _symbol;
108 bool _symbol_set;
109
110 int _number;
111 bool _number_set;
112
113 }; // class ms_quant_element
114
116
119 class MS_MASCOTRESFILE_API ms_quant_composition: public ms_xml_IValidatable
120 {
121 friend class msparser_internal::ms_quant_xmlloader;
122 public:
125
128
130 virtual ~ms_quant_composition();
131
133 void defaultValues();
134
136 void copyFrom(const ms_quant_composition* right);
137
138#ifndef SWIG
140 ms_quant_composition& operator=(const ms_quant_composition& right);
141#endif
143 virtual std::string getSchemaType() const;
144
146 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
147
149 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
150
151
153 int getNumberOfElements() const;
154
156 void clearElements();
157
159 void appendElement(const ms_quant_element *element);
160
162 const ms_quant_element * getElement(const int idx) const;
163
165 bool updateElement(const int idx, const ms_quant_element* element);
166
168 bool deleteElement(const int idx);
169
171 std::string getElementSchemaType() const;
172
173 private:
174 typedef std::vector< ms_quant_element* > element_vector;
175 element_vector _elements;
176
177 }; // class ms_quant_composition
178 // end of config_group
180
181} // namespace matrix_science
182
183#endif // MS_QUANT_COMPOSITION_HPP
184
185/*------------------------------- End of File -------------------------------*/
Describes the compositionType type in quantitation.xml.
Definition: ms_quant_composition.hpp:120
The element sub-element of compositionType in quantitation.xml.
Definition: ms_quant_composition.hpp:40