Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_umod_element.hpp
1/*
2##############################################################################
3# file: ms_umod_element.hpp #
4# 'msparser' toolkit #
5# Represents chemical element information 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_element.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_ELEMENT_HPP
18#define MS_UMOD_ELEMENT_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_xml_schema; // forward declaration
32
39 class MS_MASCOTRESFILE_API ms_umod_element: public ms_xml_IValidatable
40 {
41 friend class msparser_internal::ms_umod_xmlloader;
42 friend class ms_umod_configfile;
43
44 public:
47
50
52 virtual ~ms_umod_element();
53
55 void defaultValues();
56
58 void copyFrom(const ms_umod_element* right);
59
60#ifndef SWIG
62 ms_umod_element& operator=(const ms_umod_element& 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 bool haveTitle() const;
76
78 std::string getTitle() const;
79
81 void setTitle(const char* value);
82
84 void dropTitle();
85
87 std::string getTitleSchemaType() const;
88
89
91 bool haveFullName() const;
92
94 std::string getFullName() const;
95
97 void setFullName(const char* value);
98
100 void dropFullName();
101
103 std::string getFullNameSchemaType() const;
104
105
107 bool haveAvgeMass() const;
108
110 std::string getAvgeMass() const;
111
113 double getAvgeMassAsNumber() const;
114
116 bool setAvgeMass(const char* value, ms_errs* err = NULL);
117
119 void dropAvgeMass();
120
122 std::string getAvgeMassSchemaType() const;
123
124
126 bool haveMonoMass() const;
127
129 std::string getMonoMass() const;
130
132 double getMonoMassAsNumber() const;
133
135 bool setMonoMass(const char* value, ms_errs* err = NULL);
136
138 void dropMonoMass();
139
141 std::string getMonoMassSchemaType() const;
142
143 private:
144 std::string _title;
145 bool _title_set;
146
147 std::string _fullName;
148 bool _fullName_set;
149
150 std::string _avgeMass;
151 double _avgeMassDouble;
152 bool _avgeMass_set;
153
154 std::string _monoMass;
155 double _monoMassDouble;
156 bool _monoMass_set;
157 }; // class ms_umod_element
158 // end of config_group
160
161} // namespace matrix_science
162
163#endif // MS_UMOD_ELEMENT_HPP
164
165/*------------------------------- End of File -------------------------------*/
All errors are collected in an instance of this class.
Definition: ms_errors.hpp:37
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54
Represents an element object in unimod.xml.
Definition: ms_umod_element.hpp:40