+void Principal::loadNot(xmlNodePtr nodo)
+{
+ std::string name = (char *)xmlGetProp(nodo, BAD_CAST"nombre");
+ std::string id = (char *)xmlGetProp(nodo, BAD_CAST"id");
+ int orientacion=0, x, y;
+
+ ViewNot *p;
+ nodo = nodo->children;
+ while (nodo != NULL) {
+ if (nodo->type == XML_ELEMENT_NODE) {
+ if (xmlStrcmp(nodo->name, BAD_CAST"orientacion") == 0) {
+ orientacion = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ p = new ViewNot(name, orientacion);
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"x") == 0) {
+ x = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"y") == 0) {
+ y = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"salida") == 0) {
+ p->out_lines.push_back((char *)XML_GET_CONTENT(nodo->children));
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"entrada") == 0) {
+ p->in_lines.push_back((char *)XML_GET_CONTENT(nodo->children));
+ }
+ }
+ nodo = nodo->next;
+ }
+
+ p->signal_button_press_event().connect(SigC::bind( SigC::slot(*this, &Principal::on_item_clicked), p) );
+ p->set_position(x,y);
+ work_place->put(*p, x, y);
+ p->show();
+ // los agrego al hash
+ mapItems[name] = p;
+}
+
+void Principal::loadOr(xmlNodePtr nodo)
+{
+ std::string name = (char *)xmlGetProp(nodo, BAD_CAST"nombre");
+ std::string id = (char *)xmlGetProp(nodo, BAD_CAST"id");
+ int orientacion=0, x, y;
+
+ ViewOr *p;
+
+ nodo = nodo->children;
+ while (nodo != NULL) {
+ if (nodo->type == XML_ELEMENT_NODE) {
+ if (xmlStrcmp(nodo->name, BAD_CAST"orientacion") == 0) {
+ orientacion = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ p = new ViewOr(name, orientacion);
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"x") == 0) {
+ x = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"y") == 0) {
+ y = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"salida") == 0) {
+ p->out_lines.push_back((char *)XML_GET_CONTENT(nodo->children));
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"entrada") == 0) {
+ p->in_lines.push_back((char *)XML_GET_CONTENT(nodo->children));
+ }
+ }
+ nodo = nodo->next;
+ }
+
+ p->signal_button_press_event().connect(SigC::bind( SigC::slot(*this, &Principal::on_item_clicked), p) );
+ p->set_position(x,y);
+ work_place->put(*p, x, y);
+ p->show();
+ // los agrego al hash
+ mapItems[name] = p;
+}
+
+void Principal::loadAnd(xmlNodePtr nodo)
+{
+ std::string name = (char *)xmlGetProp(nodo, BAD_CAST"nombre");
+ std::string id = (char *)xmlGetProp(nodo, BAD_CAST"id");
+ int orientacion=0, x, y;
+ float flujo;
+ xmlNodePtr inicial = nodo;
+
+ ViewAnd *p;
+
+ nodo = nodo->children;
+ while (nodo != NULL) {
+ if (nodo->type == XML_ELEMENT_NODE) {
+ if (xmlStrcmp(nodo->name, BAD_CAST"orientacion") == 0) {
+ orientacion = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ p = new ViewAnd(name, orientacion);
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"x") == 0) {
+ x = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"y") == 0) {
+ y = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"salida") == 0) {
+ p->out_lines.push_back((char *)XML_GET_CONTENT(nodo->children));
+ } else if (xmlStrcmp(nodo->name, BAD_CAST"entrada") == 0) {
+ p->in_lines.push_back((char *)XML_GET_CONTENT(nodo->children));
+ }
+ }
+ nodo = nodo->next;
+ }
+
+ p->signal_button_press_event().connect(SigC::bind( SigC::slot(*this, &Principal::on_item_clicked), p) );
+ p->set_position(x,y);
+ work_place->put(*p, x, y);
+ p->show();
+ // los agrego al hash
+ mapItems[name] = p;
+}
+