X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..43fd94117de66d533ef9e58b2de85daa244da309:/ReferenceBlock.cpp?ds=sidebyside diff --git a/ReferenceBlock.cpp b/ReferenceBlock.cpp index 8b50bfa..93f7c41 100644 --- a/ReferenceBlock.cpp +++ b/ReferenceBlock.cpp @@ -204,8 +204,6 @@ void ReferenceBlock::loadInterfaces(QDomElement &elt) throw(Exception) { QString widthStr; QString purposeStr; int purpose; - QString levelStr; - int level; QString multStr; int mult; AbstractInterface* inter; @@ -225,12 +223,10 @@ void ReferenceBlock::loadInterfaces(QDomElement &elt) throw(Exception) { cout << "purpose for " << nameStr.toStdString() << " : " << purposeStr.toStdString() << endl; purpose = ReferenceInterface::translatePurpose(purposeStr); cout << "translated purpose : " << purpose << endl; - levelStr = eltInput.attribute("level","none"); - level = ReferenceInterface::translateLevel(levelStr); multStr = eltInput.attribute("multiplicity","none"); mult = ReferenceInterface::translateMultiplicity(multStr); - inter = new ReferenceInterface(this,nameStr,typeStr,widthStr,AbstractInterface::Input, purpose, level, mult); + inter = new ReferenceInterface(this,nameStr,typeStr,widthStr,AbstractInterface::Input, purpose, mult); inputs.append(inter); } @@ -244,12 +240,10 @@ void ReferenceBlock::loadInterfaces(QDomElement &elt) throw(Exception) { widthStr = eltOutput.attribute("width","none"); purposeStr = eltOutput.attribute("type","none"); purpose = ReferenceInterface::translatePurpose(purposeStr); - levelStr = eltOutput.attribute("level","none"); - level = ReferenceInterface::translateLevel(levelStr); multStr = eltOutput.attribute("multiplicity","none"); mult = ReferenceInterface::translateMultiplicity(multStr); - inter = new ReferenceInterface(this,nameStr,typeStr,widthStr,AbstractInterface::Output, purpose, level, mult); + inter = new ReferenceInterface(this,nameStr,typeStr,widthStr,AbstractInterface::Output, purpose, mult); outputs.append(inter); } @@ -263,12 +257,10 @@ void ReferenceBlock::loadInterfaces(QDomElement &elt) throw(Exception) { widthStr = eltBidir.attribute("width","none"); purposeStr = eltBidir.attribute("type","none"); purpose = ReferenceInterface::translatePurpose(purposeStr); - levelStr = eltBidir.attribute("level","none"); - level = ReferenceInterface::translateLevel(levelStr); multStr = eltBidir.attribute("multiplicity","none"); mult = ReferenceInterface::translateMultiplicity(multStr); - inter = new ReferenceInterface(this,nameStr,typeStr,widthStr,AbstractInterface::InOut, purpose, level, mult); + inter = new ReferenceInterface(this,nameStr,typeStr,widthStr,AbstractInterface::InOut, purpose, mult); bidirs.append(inter); } } @@ -323,8 +315,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) { toWrite << iface->getName(); toWrite << iface->getWidth(); toWrite << iface->getPurpose(); - toWrite << iface->getDirection(); - toWrite << iface->getLevel(); + toWrite << iface->getDirection(); toWrite << iface->getMultiplicity(); } toWrite << b.outputs.size(); @@ -333,8 +324,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) { toWrite << iface->getName(); toWrite << iface->getWidth(); toWrite << iface->getPurpose(); - toWrite << iface->getDirection(); - toWrite << iface->getLevel(); + toWrite << iface->getDirection(); toWrite << iface->getMultiplicity(); } toWrite << b.bidirs.size(); @@ -343,8 +333,7 @@ QDataStream& operator<<(QDataStream &out, const ReferenceBlock &b) { toWrite << iface->getName(); toWrite << iface->getWidth(); toWrite << iface->getPurpose(); - toWrite << iface->getDirection(); - toWrite << iface->getLevel(); + toWrite << iface->getDirection(); toWrite << iface->getMultiplicity(); } @@ -421,9 +410,7 @@ QDataStream& operator>>(QDataStream &in, ReferenceBlock &b) { in >> val; iface->setPurpose(val); in >> val; - iface->setDirection(val); - in >> val; - iface->setLevel(val); + iface->setDirection(val); in >> val; iface->setMultiplicity(val); b.inputs.append(iface); @@ -441,9 +428,7 @@ QDataStream& operator>>(QDataStream &in, ReferenceBlock &b) { iface->setPurpose(val); in >> val; iface->setDirection(val); - in >> val; - iface->setLevel(val); - in >> val; + in >> val; iface->setMultiplicity(val); b.outputs.append(iface); } @@ -460,9 +445,7 @@ QDataStream& operator>>(QDataStream &in, ReferenceBlock &b) { iface->setPurpose(val); in >> val; iface->setDirection(val); - in >> val; - iface->setLevel(val); - in >> val; + in >> val; iface->setMultiplicity(val); b.bidirs.append(iface); }