]> AND Private Git Repository - blast.git/blobdiff - FunctionalInterface.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
adding xsd files to master
[blast.git] / FunctionalInterface.cpp
index cc9f7658c7ab083b8fe2bfbb87cea71012e6d2c5..1b8ff07961ea4b3062b730c08210979add4244a0 100644 (file)
@@ -19,8 +19,7 @@ FunctionalInterface::FunctionalInterface(AbstractBlock* _owner, ReferenceInterfa
   name = reference->getName();\r
   width = reference->getWidth();\r
   direction = reference->getDirection();\r
   name = reference->getName();\r
   width = reference->getWidth();\r
   direction = reference->getDirection();\r
-  purpose = reference->getPurpose();\r
-  level = reference->getLevel(); \r
+  purpose = reference->getPurpose();  \r
   connectedFrom = NULL;\r
 }\r
 \r
   connectedFrom = NULL;\r
 }\r
 \r
@@ -65,10 +64,10 @@ int FunctionalInterface::getInterfaceMultiplicity() {
     return -1;\r
   }\r
   else if ( reference->getMultiplicity() == -1) {\r
     return -1;\r
   }\r
   else if ( reference->getMultiplicity() == -1) {\r
-    return ifaceCount+1;\r
+    return ifaceCount;\r
   }\r
   }\r
-  else if ( reference->getMultiplicity() > ifaceCount) {\r
-    return ifaceCount+1;\r
+  else if ( ifaceCount < reference->getMultiplicity()) {\r
+    return ifaceCount;\r
   }\r
   return -1;\r
 }\r
   }\r
   return -1;\r
 }\r
@@ -79,10 +78,9 @@ AbstractInterface *FunctionalInterface::clone() {
   FunctionalInterface *inter = new FunctionalInterface(owner, reference);\r
   inter->setWidth(width);\r
   inter->setDirection(direction);\r
   FunctionalInterface *inter = new FunctionalInterface(owner, reference);\r
   inter->setWidth(width);\r
   inter->setDirection(direction);\r
-  inter->setPurpose(purpose);\r
-  inter->setLevel(level);  \r
+  inter->setPurpose(purpose);  \r
   inter->connectFrom(NULL);\r
   inter->connectFrom(NULL);\r
-  inter->setName(reference->getName()+"_"+QString::number(id));\r
+  inter->setName(reference->getName()+"_"+QString::number(id+1));\r
   return inter;\r
 }\r
 \r
   return inter;\r
 }\r
 \r