X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/3fb762e7042d9b4a1cf78556ad9ed7f117cc53ba..4327c2b8817b627249d98d889835726217c81a4e:/Graph.cpp?ds=inline diff --git a/Graph.cpp b/Graph.cpp index 8e55077..808dbda 100644 --- a/Graph.cpp +++ b/Graph.cpp @@ -14,7 +14,7 @@ Graph::~Graph() { } void Graph::createTopGroup(bool createTopGroupIfaces) { - topGroup = new GroupBlock(NULL, createTopGroupIfaces); + topGroup = new GroupBlock(this, NULL, createTopGroupIfaces); topGroup->setName("top group"); groups.append(topGroup); } @@ -24,7 +24,7 @@ QList Graph::getOutsideInterfaces() { } GroupBlock* Graph::createChildGroupBlock(GroupBlock* parent, bool createGroupIface) { - GroupBlock* b = new GroupBlock(parent, createGroupIface); + GroupBlock* b = new GroupBlock(this, parent, createGroupIface); groups.append(b); return b; } @@ -47,10 +47,12 @@ FunctionalBlock* Graph::createFunctionalBlock(GroupBlock* group, ReferenceBlock* FunctionalBlock* newBlock = NULL; if (ref->getSpecialType() != -1) { - newBlock = new SpecialBlock(ref->getSpecialType(), group,ref, createIfaces); + cout << "Graph: create special block from " << qPrintable(ref->getName()) << endl; + newBlock = new SpecialBlock(this, ref->getSpecialType(), group,ref, createIfaces); } else { - newBlock = new FunctionalBlock(group,ref, createIfaces); + cout << "Graph: create normal block from " << qPrintable(ref->getName()) << endl; + newBlock = new FunctionalBlock(this, group,ref, createIfaces); } group->addBlock(newBlock); @@ -91,7 +93,7 @@ FunctionalBlock* Graph::getFunctionalBlockByName(QString name, GroupBlock* paren FunctionalBlock* Graph::createStimuliBlock(ReferenceBlock* ref, bool createIfaces) { /* A stimuli block is always a special block with idSpecial = 1 */ - FunctionalBlock* newBlock = new SpecialBlock(AbstractBlock::Source, NULL,ref, createIfaces); + FunctionalBlock* newBlock = new SpecialBlock(this, AbstractBlock::Source, NULL,ref, createIfaces); stimulis.append(newBlock); return newBlock; }