X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/624231601a0f5daea9b8809993ad3503beafce4f..8d3e09e430e829b9d847847334cbfe37790baca3:/AbstractBlock.cpp?ds=inline diff --git a/AbstractBlock.cpp b/AbstractBlock.cpp index 87c973c..c71b2e0 100644 --- a/AbstractBlock.cpp +++ b/AbstractBlock.cpp @@ -52,6 +52,13 @@ 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); } @@ -137,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) {