00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GELEMENTDATAH
00026 #define GELEMENTDATAH
00027
00028 #include <QObject>
00029 #include <QDomDocument>
00030
00031 namespace GCS
00032 {
00033
00034 class GVector3;
00035
00059 class GElementData : public QObject, public QDomDocument
00060 {
00061 Q_OBJECT
00062
00063 public:
00064
00068 GElementData();
00069
00073 virtual ~GElementData();
00074
00075
00076
00077 public:
00078
00084 QDomElement xmlGetTopElement(QString tag_name, bool& ok);
00085
00091 QDomElement xmlGetElement(QDomElement parent, QString child_tag_name, bool& existed);
00092
00121 QDomElement xmlGetElement(QString xpath, bool& existed);
00122
00128 QDomElement xmlGetTopElement(QString tag_name, bool& ok) const;
00129
00135 QDomElement xmlGetElement(QDomElement parent, QString child_tag_name, bool& existed) const;
00136
00165 QDomElement xmlGetElement(QString xpath, bool& existed) const;
00166
00177 void xmlRemoveNodeContent(QDomElement node);
00178
00183 QString xmlGetText(QDomElement element, bool& ok) const;
00184
00189 QString xmlGetText(QString xpath, bool& ok) const;
00190
00195 void xmlSetText(QDomElement element, QString text, bool& ok);
00196
00201 void xmlSetText(QString xpath, QString text, bool& ok);
00202
00207 bool xmlGetFlag(QDomElement element, bool& ok) const;
00208
00213 bool xmlGetFlag(QString xpath, bool& ok) const;
00214
00218 void xmlSetFlag(QDomElement element, bool value, bool& ok);
00219
00223 void xmlSetFlag(QString xpath, bool value, bool& ok);
00224
00229 int xmlGetInteger(QDomElement element, bool& ok) const;
00230
00235 int xmlGetInteger(QString xpath, bool& ok) const;
00236
00240 void xmlSetInteger(QDomElement element, int value, bool& ok);
00241
00245 void xmlSetInteger(QString xpath, int value, bool& ok);
00246
00251 unsigned long xmlGetULongInteger(QDomElement element, bool& ok) const;
00252
00257 unsigned long xmlGetULongInteger(QString xpath, bool& ok) const;
00258
00262 void xmlSetULongInteger(QDomElement element, unsigned long value, bool& ok);
00263
00267 void xmlSetULongInteger(QString xpath, unsigned long value, bool& ok);
00268
00273 double xmlGetDouble(QDomElement element, bool& ok) const;
00274
00279 double xmlGetDouble(QString xpath, bool& ok) const;
00280
00284 void xmlSetDouble(QDomElement element, double value, bool& ok);
00285
00289 void xmlSetDouble(QString xpath, double value, bool& ok);
00290
00295 GVector3 xmlGetVector3(QDomElement element, bool& ok) const;
00296
00320 GVector3 xmlGetVector3(QString xpath, bool& ok) const;
00321
00325 void xmlSetVector3(QDomElement element, const GVector3& value, bool& ok);
00326
00331 void xmlSetVector3(QString xpath, const GVector3& value, bool& ok);
00332
00333
00334 };
00335
00336 }
00337
00338 #endif