X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..5ce5a13d19945d096272447daa2e242c0a01b9f0:/FunctionalInterface.cpp?ds=inline diff --git a/FunctionalInterface.cpp b/FunctionalInterface.cpp index cc9f765..1b8ff07 100644 --- a/FunctionalInterface.cpp +++ b/FunctionalInterface.cpp @@ -19,8 +19,7 @@ FunctionalInterface::FunctionalInterface(AbstractBlock* _owner, ReferenceInterfa name = reference->getName(); width = reference->getWidth(); direction = reference->getDirection(); - purpose = reference->getPurpose(); - level = reference->getLevel(); + purpose = reference->getPurpose(); connectedFrom = NULL; } @@ -65,10 +64,10 @@ int FunctionalInterface::getInterfaceMultiplicity() { return -1; } else if ( reference->getMultiplicity() == -1) { - return ifaceCount+1; + return ifaceCount; } - else if ( reference->getMultiplicity() > ifaceCount) { - return ifaceCount+1; + else if ( ifaceCount < reference->getMultiplicity()) { + return ifaceCount; } return -1; } @@ -79,10 +78,9 @@ AbstractInterface *FunctionalInterface::clone() { FunctionalInterface *inter = new FunctionalInterface(owner, reference); inter->setWidth(width); inter->setDirection(direction); - inter->setPurpose(purpose); - inter->setLevel(level); + inter->setPurpose(purpose); inter->connectFrom(NULL); - inter->setName(reference->getName()+"_"+QString::number(id)); + inter->setName(reference->getName()+"_"+QString::number(id+1)); return inter; }