]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/src/workplace.cpp
* Ahora el modelo carga las compuertas logicas y crea las lineas necesarias
[z.facultad/75.42/plaqui.git] / Constructor / src / workplace.cpp
index 2b04130487e1e58665709e74b767cb5b044b93b0..847aa17930769248e8480b28a7bf0c272d93bf06 100644 (file)
@@ -174,6 +174,27 @@ CItem *WorkPlace::get_item(int _id)
        return NULL;
 }
 
        return NULL;
 }
 
+int WorkPlace::get_logic_id(const std::string &_s)
+{
+       std::list<CItem *>::iterator i = lista_logic_Items->begin();
+       while ( i != lista_logic_Items->end() ){
+               if ( (*i)->get_name() == _s ) 
+                       return (*i)->get_id();
+               i++;
+       }
+       return -1;
+}
+
+int WorkPlace::get_item_id(const std::string &_s)
+{
+       std::list<CItem *>::iterator i = listaItems->begin();
+       while ( i != listaItems->end() ){
+               if ( (*i)->get_name() == _s ) 
+                       return (*i)->get_id();
+               i++;
+       }
+       return -1;
+}
        
 void WorkPlace::delete_line(int _id)
 {
        
 void WorkPlace::delete_line(int _id)
 {