X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/0d3590739ff5a4ca9e87c052ac142f5d1d3a68ab..8d3e09e430e829b9d847847334cbfe37790baca3:/AbstractBlock.cpp diff --git a/AbstractBlock.cpp b/AbstractBlock.cpp index ba1c179..c71b2e0 100644 --- a/AbstractBlock.cpp +++ b/AbstractBlock.cpp @@ -44,6 +44,21 @@ bool AbstractBlock::isGroupBlock() { return false; } +bool AbstractBlock::isTopGroupBlock() { + return false; +} + +bool AbstractBlock::isSourceBlock() { + return false; +} + +bool AbstractBlock::isGeneratorBlock() { + foreach(AbstractInterface* iface, inputs) { + if (iface->getPurpose() == AbstractInterface::Data) return false; + } + return true; +} + void AbstractBlock::addParameter(BlockParameter *param) { params.append(param); } @@ -129,6 +144,26 @@ QList AbstractBlock::getDataInputs() { return list; } +QList AbstractBlock::getControlInputs() { + QList list; + foreach(AbstractInterface* iface, inputs) { + if (iface->getPurpose() == AbstractInterface::Control) { + list.append(iface); + } + } + return list; +} + +QList AbstractBlock::getControlOutputs() { + QList list; + foreach(AbstractInterface* iface, outputs) { + if (iface->getPurpose() == AbstractInterface::Control) { + list.append(iface); + } + } + return list; +} + AbstractInterface* AbstractBlock::getIfaceFromName(QString name) { foreach(AbstractInterface* iface, inputs) {