00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef MS_UMOD_MODBRICK_HPP
00018 #define MS_UMOD_MODBRICK_HPP
00019
00020
00021 #include <string>
00022 #include <vector>
00023
00024
00025 namespace msparser_internal {
00026 class ms_umod_xmlloader;
00027 }
00028
00029 namespace matrix_science {
00030
00031 class ms_umod_elemref;
00032 class ms_xml_schema;
00033
00039
00040 class MS_MASCOTRESFILE_API ms_umod_modbrick: public ms_xml_IValidatable
00041 {
00042 friend class msparser_internal::ms_umod_xmlloader;
00043 friend class ms_umod_configfile;
00044
00045 public:
00047 ms_umod_modbrick();
00048
00050 ms_umod_modbrick(const ms_umod_modbrick& src);
00051
00053 virtual ~ms_umod_modbrick();
00054
00056 void defaultValues();
00057
00059 void copyFrom(const ms_umod_modbrick* right);
00060
00061 #ifndef SWIG
00062
00063 ms_umod_modbrick& operator=(const ms_umod_modbrick& right);
00064 #endif
00065
00066 virtual std::string getSchemaType() const;
00067
00069 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00070
00072 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00073
00074
00076 int getNumberOfElemRefs() const;
00077
00079 void clearElemRefs();
00080
00082 void appendElemRef(const ms_umod_elemref *elemref);
00083
00085 const ms_umod_elemref* getElemRef(const int idx) const;
00086
00088 bool updateElemRef(const int idx, const ms_umod_elemref *elemref);
00089
00091 bool deleteElemRef(const int idx);
00092
00094 std::string getElemRefSchemaType() const;
00095
00096
00098 bool haveTitle() const;
00099
00101 std::string getTitle() const;
00102
00104 void setTitle(const char* value);
00105
00107 void dropTitle();
00108
00110 std::string getTitleSchemaType() const;
00111
00112
00114 bool haveFullName() const;
00115
00117 std::string getFullName() const;
00118
00120 void setFullName(const char* value);
00121
00123 void dropFullName();
00124
00126 std::string getFullNameSchemaType() const;
00127
00128
00130 bool haveAvgeMass() const;
00131
00133 double getAvgeMass() const;
00134
00136 void setAvgeMass(const double value);
00137
00139 void dropAvgeMass();
00140
00142 std::string getAvgeMassSchemaType() const;
00143
00144
00146 bool haveMonoMass() const;
00147
00149 double getMonoMass() const;
00150
00152 void setMonoMass(const double value);
00153
00155 void dropMonoMass();
00156
00158 std::string getMonoMassSchemaType() const;
00159
00160 private:
00161
00162 typedef std::vector< ms_umod_elemref* > elemref_vector;
00163 elemref_vector _elemRefs;
00164
00165 std::string _title;
00166 bool _title_set;
00167
00168 std::string _fullName;
00169 bool _fullName_set;
00170
00171 double _avgeMass;
00172 bool _avgeMass_set;
00173
00174 double _monoMass;
00175 bool _monoMass_set;
00176 };
00177
00179
00180 }
00181
00182 #endif // MS_UMOD_MODBRICK_HPP
00183
00184