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

Private GIT Repository
wipe some useluess files
[blast.git] / FunctionalInterface.cpp
index 7224b3fc7f923e5cd7fd4820d9a15d5635b1c450..23fd4820129f5e0a5d920bc9768f078d33109cc4 100644 (file)
@@ -17,6 +17,8 @@ FunctionalInterface::FunctionalInterface(AbstractBlock* _owner, ReferenceInterfa
   reference = _reference;\r
 \r
   name = reference->getName();\r
   reference = _reference;\r
 \r
   name = reference->getName();\r
+  type = reference->getType();\r
+  endianess = reference->getEndianess();\r
   width = reference->getWidth();\r
   direction = reference->getDirection();\r
   purpose = reference->getPurpose();  \r
   width = reference->getWidth();\r
   direction = reference->getDirection();\r
   purpose = reference->getPurpose();  \r
@@ -76,10 +78,7 @@ AbstractInterface *FunctionalInterface::clone() {
   int id = getInterfaceMultiplicity();\r
   if (id < 0) return NULL;\r
   FunctionalInterface *inter = new FunctionalInterface(owner, reference);\r
   int id = getInterfaceMultiplicity();\r
   if (id < 0) return NULL;\r
   FunctionalInterface *inter = new FunctionalInterface(owner, reference);\r
-  inter->setWidth(width);\r
-  inter->setDirection(direction);\r
-  inter->setPurpose(purpose);  \r
-  inter->connectFrom(NULL);\r
+  inter->setWidth(width);  \r
   inter->setName(reference->getName()+"_"+QString::number(id+1));\r
   return inter;\r
 }\r
   inter->setName(reference->getName()+"_"+QString::number(id+1));\r
   return inter;\r
 }\r
@@ -104,7 +103,8 @@ bool FunctionalInterface::canConnectTo(AbstractInterface *iface) {
   */\r
   if (direction == Input) return false;\r
   if (iface->isReferenceInterface()) return false;\r
   */\r
   if (direction == Input) return false;\r
   if (iface->isReferenceInterface()) return false;\r
-  if (iface->getConnectedFrom() != NULL) return false;\r
+  ConnectedInterface* connIface = AI_TO_CON(iface);\r
+  if (connIface->getConnectedFrom() != NULL) return false;\r
   // first case: interface of blocks within the same group\r
   if (getOwner()->getParent() == iface->getOwner()->getParent()) {\r
 \r
   // first case: interface of blocks within the same group\r
   if (getOwner()->getParent() == iface->getOwner()->getParent()) {\r
 \r