#include "Parameters.h"
ReferenceBlock::ReferenceBlock(const QString _xmlFile) : AbstractBlock() {
- xmlFile = _xmlFile;
+ xmlFile = _xmlFile;
}
void ReferenceBlock::addCategory(int id) {
void ReferenceBlock::load(QDomElement &elt) throw(Exception) {
+ cout << "Block : get version" << endl;
+ QString verStr = elt.attribute("version","none");
+ QString specialStr = elt.attribute("special","none");
+ if (verStr != "none") {
+ setVersion(verStr);
+ }
+ else {
+ setVersion("0.0");
+ }
+ setSpecialType(getSpecialTypeFromString(specialStr));
cout << "Block : get informations" << endl;
QDomElement eltInfo = elt.firstChildElement("informations");
toWrite << b.name;
toWrite << b.xmlFile;
+ toWrite << b.specialType;
+ toWrite << b.version;
toWrite << b.description;
toWrite << b.categories;
toWrite << b.hashMd5;
in >> b.name;
in >> b.xmlFile;
+ in >> b.specialType;
+ in >> b.version;
in >> b.description;
in >> b.categories;
in >> b.hashMd5;