X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8e89ca269960b7bb43ccc054696dfc28e84d409a..48f48e6a26a54751ecd0ab90b10ab972cc5e89cd:/Dispatcher.cpp?ds=sidebyside diff --git a/Dispatcher.cpp b/Dispatcher.cpp index 9035183..4cd112d 100644 --- a/Dispatcher.cpp +++ b/Dispatcher.cpp @@ -94,26 +94,12 @@ bool Dispatcher::createConnection(InterfaceItem *iface1, InterfaceItem *iface2) // test the ref1->ref2 connection if ((ref1->canConnectTo(ref2)) && (ref2->canConnectFrom(ref1))) { - ref1->connectTo(ref2); - /* - ref2->connectFrom(ref1); - if ((asso1 != NULL) && (asso2 != NULL)) { - asso1->connectTo(asso2); - asso2->connectFrom(asso1); - } - */ + ref1->connectTo(ref2); ok1 = true; } // if the frist one did not work, test ref2->ref1 if ((ok1 == false) && (ref2->canConnectTo(ref1)) && (ref1->canConnectFrom(ref2))) { - ref2->connectTo(ref1); - /* - ref1->connectFrom(ref2); - if ((asso1 != NULL) && (asso2 != NULL)) { - asso1->connectFrom(asso2); - asso2->connectTo(asso1); - } - */ + ref2->connectTo(ref1); ok2 = true; } if ((ok1 == true) || (ok2 == true)) { @@ -122,6 +108,7 @@ bool Dispatcher::createConnection(InterfaceItem *iface1, InterfaceItem *iface2) unselectAllItems(); params->unsaveModif = true; + cout << "created a connection from " << qPrintable(ref1->getName()) << " to " << qPrintable(ref2->getName()) << endl; return true; } return false; @@ -351,6 +338,18 @@ void Dispatcher::renameInterface(InterfaceItem *item) { item->getOwner()->nameChanged(); } +void Dispatcher::showPatterns(InterfaceItem *item) { + static QString fctName = "Dispatcher::showPatterns()"; +#ifdef DEBUG_FCTNAME + cout << "call to " << qPrintable(fctName) << endl; +#endif + ConnectedInterface* iface = AI_TO_CON(item->refInter->getAssociatedIface()); + foreach(char c, iface->getOutputPattern()) { + cout << (int)c; + } + cout << endl; +} + void Dispatcher::duplicateBoxItem(BoxItem *item){ static QString fctName = "Dispatcher::duplicateBoxItem()"; #ifdef DEBUG_FCTNAME