Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_quant_ratio.hpp
1/*
2##############################################################################
3# file: ms_quant_ratio.hpp #
4# 'msparser' toolkit #
5# Encapsulates "ratioType" 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_ratio.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_RATIO_HPP
18#define MS_QUANT_RATIO_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_numerator; // forward declaration
32 class ms_xml_schema; // forward declaration
33
40 class MS_MASCOTRESFILE_API ms_quant_ratio: public ms_xml_IValidatable
41 {
42 friend class msparser_internal::ms_quant_xmlloader;
43
44 public:
47
50
52 virtual ~ms_quant_ratio();
53
55 void defaultValues();
56
58 void copyFrom(const ms_quant_ratio* right);
59
60#ifndef SWIG
62 ms_quant_ratio& operator=(const ms_quant_ratio& right);
63#endif
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 int getNumberOfNumerators() const;
76
78 void clearNumerators();
79
81 void appendNumerator(const ms_quant_numerator *numerator);
82
84 const ms_quant_numerator * getNumeratorByNumber(const int idx) const;
85
87 const ms_quant_numerator * getNumeratorByName(const char *name) const;
88
90 bool updateNumeratorByNumber(const int idx, const ms_quant_numerator* numerator);
91
93 bool updateNumeratorByName(const char *name, const ms_quant_numerator* numerator);
94
96 bool deleteNumeratorByNumber(const int idx);
97
99 bool deleteNumeratorByName(const char *name);
100
102 std::string getNumeratorSchemaType() const;
103
104
106 int getNumberOfDenominators() const;
107
109 void clearDenominators();
110
112 void appendDenominator(const ms_quant_numerator *denominator);
113
115 const ms_quant_numerator * getDenominatorByNumber(const int idx) const;
116
118 const ms_quant_numerator * getDenominatorByName(const char *name) const;
119
121 bool updateDenominatorByNumber(const int idx, const ms_quant_numerator* denominator);
122
124 bool updateDenominatorByName(const char *name, const ms_quant_numerator* denominator);
125
127 bool deleteDenominatorByNumber(const int idx);
128
130 bool deleteDenominatorByName(const char *name);
131
133 std::string getDenominatorSchemaType() const;
134
135
137 bool haveName() const;
138
140 std::string getName() const;
141
143 void setName(const char* value);
144
146 void dropName();
147
149 std::string getNameSchemaType() const;
150
151 private:
152 typedef std::vector< ms_quant_numerator* > numerator_vector;
153 numerator_vector _numerators;
154
155 numerator_vector _denominators;
156
157 std::string _name;
158 bool _name_set;
159
160 }; // class ms_quant_ratio
161 // end of config_group
163
164} // namespace matrix_science
165
166#endif // MS_QUANT_RATIO_HPP
167
168/*------------------------------- End of File -------------------------------*/
Represent numerator_component and denominator_component elements.
Definition: ms_quant_numerator.hpp:40
Represents the ratioType type for the report_ratio element in quantitation.xml.
Definition: ms_quant_ratio.hpp:41