X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/3bcfe4df6fdde086eb1b59f7a0173358170174a1..3fb762e7042d9b4a1cf78556ad9ed7f117cc53ba:/ReferenceBlock.cpp diff --git a/ReferenceBlock.cpp b/ReferenceBlock.cpp index b6dee80..9b3959c 100644 --- a/ReferenceBlock.cpp +++ b/ReferenceBlock.cpp @@ -9,7 +9,7 @@ #include "Parameters.h" ReferenceBlock::ReferenceBlock(const QString _xmlFile) : AbstractBlock() { - xmlFile = _xmlFile; + xmlFile = _xmlFile; } void ReferenceBlock::addCategory(int id) { @@ -40,6 +40,16 @@ void ReferenceBlock::setHashMd5() { 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"); @@ -419,6 +429,8 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) { toWrite << b.name; toWrite << b.xmlFile; + toWrite << b.specialType; + toWrite << b.version; toWrite << b.description; toWrite << b.categories; toWrite << b.hashMd5; @@ -547,6 +559,8 @@ QDataStream& operator>>(QDataStream &in, ReferenceBlock &b) { in >> b.name; in >> b.xmlFile; + in >> b.specialType; + in >> b.version; in >> b.description; in >> b.categories; in >> b.hashMd5;