]> AND Private Git Repository - blast.git/blobdiff - Dispatcher.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modif in VHDLConverter
[blast.git] / Dispatcher.cpp
index 4cd112df29a665f9e1dbcdc354353cdeffa6bdb8..a416f956083249311fa4679113c952dbcd40348c 100644 (file)
@@ -84,9 +84,7 @@ void Dispatcher::closeCurrentProject() {
 bool Dispatcher::createConnection(InterfaceItem *iface1, InterfaceItem *iface2) {
     
   ConnectedInterface* ref1 = iface1->refInter;
 bool Dispatcher::createConnection(InterfaceItem *iface1, InterfaceItem *iface2) {
     
   ConnectedInterface* ref1 = iface1->refInter;
-  ConnectedInterface* ref2 = iface2->refInter;
-  ConnectedInterface* asso1 = (ConnectedInterface*)(iface1->refInter->getAssociatedIface());
-  ConnectedInterface* asso2 = (ConnectedInterface*)(iface2->refInter->getAssociatedIface());
+  ConnectedInterface* ref2 = iface2->refInter;  
   // connect both interface
 
   bool ok1 = false;
   // connect both interface
 
   bool ok1 = false;
@@ -344,7 +342,7 @@ void Dispatcher::showPatterns(InterfaceItem *item) {
   cout << "call to " << qPrintable(fctName) << endl;
 #endif
   ConnectedInterface* iface = AI_TO_CON(item->refInter->getAssociatedIface());
   cout << "call to " << qPrintable(fctName) << endl;
 #endif
   ConnectedInterface* iface = AI_TO_CON(item->refInter->getAssociatedIface());
-  foreach(char c, iface->getOutputPattern()) {
+  foreach(char c, *(iface->getOutputPattern())) {
     cout << (int)c;
   }
   cout << endl;
     cout << (int)c;
   }
   cout << endl;
@@ -423,7 +421,7 @@ void Dispatcher::duplicateInterfaceItem(InterfaceItem *item) {
   // creating control interface if needed
   if (refI->getAssociatedIface() != NULL) {
     QString ctlName = cloneIface->getName()+"_enb";
   // creating control interface if needed
   if (refI->getAssociatedIface() != NULL) {
     QString ctlName = cloneIface->getName()+"_enb";
-    ReferenceInterface* ctlIface = new ReferenceInterface(refB,ctlName,"boolean","1",cloneIface->getDirection(), AbstractInterface::Control, 1);
+    ReferenceInterface* ctlIface = new ReferenceInterface(refB,ctlName,cloneIface->getDirection(), AbstractInterface::Control,"boolean","1", AbstractInterface::LittleEndian, 1);
     refB->addInterface(ctlIface);
     if (! ctlIface->setAssociatedIface(cloneIface)) {
       cerr << "Abnormal case while cloning an interface and creating its associated control interface" << endl;
     refB->addInterface(ctlIface);
     if (! ctlIface->setAssociatedIface(cloneIface)) {
       cerr << "Abnormal case while cloning an interface and creating its associated control interface" << endl;
@@ -833,8 +831,7 @@ void Dispatcher::removeBoxItem(BoxItem *item) {
   removeAllBlockConnections(item);
 
   if (item->getRefBlock()->isFunctionalBlock()) {
   removeAllBlockConnections(item);
 
   if (item->getRefBlock()->isFunctionalBlock()) {
-    FunctionalBlock* block = AB_TO_FUN(item->getRefBlock());
-    GroupBlock* group = AB_TO_GRP(block->getParent());
+    FunctionalBlock* block = AB_TO_FUN(item->getRefBlock());    
     item->getScene()->removeBoxItem(item);
     params->getGraph()->removeFunctionalBlock(block);
   }
     item->getScene()->removeBoxItem(item);
     params->getGraph()->removeFunctionalBlock(block);
   }