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

Private GIT Repository
correct relative positionning of source/group
[blast.git] / GroupBlock.cpp
index 74ec197086d458f9e7e0ddb3f2033c6aaba1bb8e..7995e62afef12393e3b99ed0676b7e9448e46808 100644 (file)
@@ -34,12 +34,17 @@ bool GroupBlock::isGroupBlock() {
   return true;
 }
 
+bool GroupBlock::isTopGroupBlock() {
+  return topGroup;
+}
+
 void GroupBlock::setParent(AbstractBlock *_parent) {
   parent = _parent;
   if (parent != NULL) {
     topGroup = false;
   }
 }
+
 void GroupBlock::removeAllBlocks() {
   foreach(AbstractBlock* block, blocks) {
     if (block->isGroupBlock()) {
@@ -58,6 +63,15 @@ void GroupBlock::removeBlock(AbstractBlock* block) {
   delete block;
 }
 
+AbstractBlock *GroupBlock::getFunctionalBlockByName(QString name) {
+  foreach(AbstractBlock* block, blocks) {
+    if (block->isFunctionalBlock()) {
+      if (block->getName() == name) return block;
+    }
+  }
+  return NULL;
+}
+
 void GroupBlock::parametersValidation(QList<AbstractBlock *> *checkedBlocks, QList<AbstractBlock *> *blocksToConfigure) {
 
   /*