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

Private GIT Repository
added an example of source block
[blast.git] / GroupInterface.cpp
index 14f8b43e08b0912f8fc4f50e00c4a1e233ade918..7fc8745e032e9ea82adac25b985bd0e8f9a29bb6 100644 (file)
@@ -2,18 +2,9 @@
 #include "FunctionalInterface.h"
 #include "GroupBlock.h"
 
-GroupInterface::GroupInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _level) throw(Exception) : ConnectedInterface(_owner,_name,"expression","",_direction,AbstractInterface::Data,_level) {
+GroupInterface::GroupInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose) throw(Exception) : ConnectedInterface(_owner,_name,"expression","",_direction,_purpose) {
   if (! _owner->isGroupBlock()) throw(Exception(BLOCK_INVALID_TYPE));
 
-  /* If the owner group is the top group, then all its interfaces are at top level => force them to be top.
-     If not, force them to be basic
-   */
-  if (((GroupBlock*)_owner)->isTop()) {
-    level = AbstractInterface::Top;
-  }
-  else {
-    level = AbstractInterface::Basic;
-  }
   connectedFrom = NULL;
 }
 
@@ -22,11 +13,8 @@ bool GroupInterface::isGroupInterface() {
 }
 
 AbstractInterface *GroupInterface::clone() {
-    GroupInterface *inter = new GroupInterface(owner,name,direction,level);
-    inter->setWidth(width);
-    inter->setDirection(direction);
-    inter->setPurpose(purpose);
-    inter->setLevel(level);
+    GroupInterface *inter = new GroupInterface(owner,name,direction, purpose);
+    inter->setWidth(width);    
     inter->connectFrom(NULL);
 
     return inter;