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()) {
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) {
/*
BlockParameter* p = getParameterFromName(name);
if (p != NULL) params.removeAll(p);
}
+
+void GroupBlock::initInputPattern() {
+ foreach(AbstractInterface* iface, getControlInputs()) {
+ iface->setOutputPattern(iface->getConnectedFrom()->getOutputPattern());
+ }
+}
+
+void GroupBlock::computeOutputPattern(int nbExec) {
+
+ // get the input pattern on each inputs
+ initInputPattern();
+ // find blocks that are connected to that inputs
+
+ foreach(AbstractInterface* iface, getControlOutputs()) {
+ iface->setOutputPattern(iface->getConnectedFrom()->getOutputPattern());
+ }
+}