]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
Se arregla un error de conexion en un caso particular de las compuertas
authorRicardo Markiewicz <gazer.arg@gmail.com>
Fri, 5 Dec 2003 02:55:28 +0000 (02:55 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Fri, 5 Dec 2003 02:55:28 +0000 (02:55 +0000)
Model/src/simulator.cpp

index 7811d4eef0694d3520ac04452c42421ad986b8cb..be680057c5f596a7a404f9569a4facee8d443c8e 100644 (file)
@@ -608,7 +608,13 @@ void Simulator::connect_logic(LogicControl *current, xmlNodePtr nodo)
                                        current->connect( item->get_logic_output(), IConector::IN );
                                }
                        } else {
-                               std::cout << "ERROR : Item no es tipo Control!!" << std::endl;
+                               LogicControl *logic = dynamic_cast<LogicControl *>(find_logic((char *)XML_GET_CONTENT(nodo->children)));
+                               /* Bien, si no era un control, debe ser una compuerta */
+                               if (logic != NULL) {
+                                       current->connect(logic, IConector::IN);
+                               } else {
+                                       std::cout << "ERROR : Item no es tipo Control ni tipo LogicControl ... esto si que esta todo malllll!!" << std::endl;
+                               }
                        }
                } else if (xmlStrcmp(nodo->name, BAD_CAST"salida") == 0) {
                        item = dynamic_cast<Control *>(find((char *)XML_GET_CONTENT(nodo->children)));