X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/d43174d0eb3d293b3bb5fbe76662241134e74d0d..8d3e09e430e829b9d847847334cbfe37790baca3:/AbstractBlock.cpp?ds=sidebyside diff --git a/AbstractBlock.cpp b/AbstractBlock.cpp index d316800..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); } @@ -119,6 +134,36 @@ QList AbstractBlock::getInterfaces() { return list; } +QList AbstractBlock::getDataInputs() { + QList list; + foreach(AbstractInterface* iface, inputs) { + if (iface->getPurpose() == AbstractInterface::Data) { + list.append(iface); + } + } + 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) {