X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/3bcfe4df6fdde086eb1b59f7a0173358170174a1..a13795fc34cd1e74f94695d35253c3d00abec9bc:/ReferenceBlock.cpp?ds=sidebyside diff --git a/ReferenceBlock.cpp b/ReferenceBlock.cpp index b6dee80..553955b 100644 --- a/ReferenceBlock.cpp +++ b/ReferenceBlock.cpp @@ -8,8 +8,8 @@ #include "BlockParameterWishbone.h" #include "Parameters.h" -ReferenceBlock::ReferenceBlock(const QString _xmlFile) : AbstractBlock() { - xmlFile = _xmlFile; +ReferenceBlock::ReferenceBlock(const QString _xmlFile) : AbstractBlock(NULL) { + 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; @@ -745,3 +759,4 @@ QList ReferenceBlock::getExternalResources() { return list; } +