X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..dd3fe103df79a5a4c2962e2f05fec9a9ed58580d:/FunctionalInterface.cpp?ds=inline diff --git a/FunctionalInterface.cpp b/FunctionalInterface.cpp index cc9f765..d34cc8d 100644 --- a/FunctionalInterface.cpp +++ b/FunctionalInterface.cpp @@ -19,9 +19,8 @@ FunctionalInterface::FunctionalInterface(AbstractBlock* _owner, ReferenceInterfa name = reference->getName(); width = reference->getWidth(); direction = reference->getDirection(); - purpose = reference->getPurpose(); - level = reference->getLevel(); - connectedFrom = NULL; + purpose = reference->getPurpose(); + connectedFrom = NULL; } bool FunctionalInterface::isFunctionalInterface() { @@ -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; }