X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..d111eaf49741a0a79d372445f97c314a637e331e:/FunctionalBlock.cpp diff --git a/FunctionalBlock.cpp b/FunctionalBlock.cpp index f547084..51bebe8 100644 --- a/FunctionalBlock.cpp +++ b/FunctionalBlock.cpp @@ -41,30 +41,54 @@ bool FunctionalBlock::isFunctionalBlock() { return true; } +bool FunctionalBlock::isSourceBlock() { + if (parent == NULL) return true; + return false; +} + void FunctionalBlock::populate() { int i; BlockParameter* p; AbstractInterface* inter; + // create parameters from reference block QList lstParam = reference->getParameters(); for(i=0;iclone(); addParameter(p); } - QList lstInter = reference->getInterfaces(); - for(i=0;i lstRef = reference->getInterfaces(); + // store relation between functional and reference + QHash hashIface; + for(i=0;igetPurpose() == AbstractInterface::Control) { + funCtlIface = hashIface.value(refIface); + funDataIface = hashIface.value(refIface->getAssociatedIface()); + if (! funCtlIface->setAssociatedIface(funDataIface)) { + cerr << "Abnormal case when associating a control interface to data" << endl << "Aborting execution." << endl; + exit(1); + } + } + } }