Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_umod_modbrick.hpp
1/*
2##############################################################################
3# file: ms_umod_modbrick.hpp #
4# 'msparser' toolkit #
5# Represents modbrick object 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_modbrick.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_MODBRICK_HPP
18#define MS_UMOD_MODBRICK_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_xml_schema; // forward declaration
33
40 class MS_MASCOTRESFILE_API ms_umod_modbrick: public ms_xml_IValidatable
41 {
42 friend class msparser_internal::ms_umod_xmlloader;
43 friend class ms_umod_configfile;
44
45 public:
48
51
53 virtual ~ms_umod_modbrick();
54
56 void defaultValues();
57
59 void copyFrom(const ms_umod_modbrick* right);
60
61#ifndef SWIG
63 ms_umod_modbrick& operator=(const ms_umod_modbrick& right);
64#endif
66 virtual std::string getSchemaType() const;
67
69 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
70
72 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
73
74
76 int getNumberOfElemRefs() const;
77
79 void clearElemRefs();
80
82 void appendElemRef(const ms_umod_elemref *elemref);
83
85 const ms_umod_elemref* getElemRef(const int idx) const;
86
88 bool updateElemRef(const int idx, const ms_umod_elemref *elemref);
89
91 bool deleteElemRef(const int idx);
92
94 std::string getElemRefSchemaType() const;
95
96
98 bool haveTitle() const;
99
101 std::string getTitle() const;
102
104 void setTitle(const char* value);
105
107 void dropTitle();
108
110 std::string getTitleSchemaType() const;
111
112
114 bool haveFullName() const;
115
117 std::string getFullName() const;
118
120 void setFullName(const char* value);
121
123 void dropFullName();
124
126 std::string getFullNameSchemaType() 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
160 private:
161
162 typedef std::vector< ms_umod_elemref* > elemref_vector;
163 elemref_vector _elemRefs;
164
165 std::string _title;
166 bool _title_set;
167
168 std::string _fullName;
169 bool _fullName_set;
170
171 double _avgeMass;
172 bool _avgeMass_set;
173
174 double _monoMass;
175 bool _monoMass_set;
176 }; // class ms_umod_modbrick
177 // end of config_group
179
180} // namespace matrix_science
181
182#endif // MS_UMOD_MODBRICK_HPP
183
184/*------------------------------- End of File -------------------------------*/
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
Represents a modification brick object in unimod.xml.
Definition: ms_umod_modbrick.hpp:41