/* * * [desc.] */ #include "Tools/Viewer/Parser/include/parser.h" using namespace morpheo::tools::viewer::bdd; namespace morpheo{ namespace tools{ namespace viewer{ namespace parser{ void Parse::parser_pos(QDomNode n){ while( !n.isNull() ) { QDomElement e = n.toElement(); if( !e.isNull() ) { if( e.tagName() == "comment" ) { #ifdef DBUG_PARSE cout << "comment" <setComment(e.text().toStdString()); } if (e.tagName() == "entity" ) { #ifdef DBUG_PARSE cout << "entity" <setEntity(ent); parser_pos(n.firstChild()); if((n.nextSiblingElement()).tagName() !="architecture") { #ifdef DBUG_PARSE cout << "pas d'archi" <addBaseP(pos,s); } } if (e.tagName() == "port" ) { #ifdef DBUG_PARSE cout << "port" <setComment(e.text().toStdString()); ent->addport(p); } if (e.tagName() == "architecture" ) { #ifdef DBUG_PARSE cout << "architecture" <setArchitecture(arch); base->addBaseP(pos,s); parser_pos(n.firstChild()); } if (e.tagName() == "component" ) { #ifdef DBUG_PARSE cout << "component" <addComponent(comp, e.attribute("type","").toStdString()); ctemp=comp; string fichier=absolutePath; fichier.append(e.attribute("type","").toStdString()); fichier.append(".pos"); #ifdef DBUG_PARSE cout << fichier <get_BasePos(e.attribute("type","").toStdString()); QList *sspor= (pt.getEntity())->getPort(); for(QList::iterator it=sspor->begin();it!=sspor->end();++it) ctemp->addport(new Port(*it)); } if (e.tagName() == "port_map" ) { #ifdef DBUG_PARSE cout << "port_map" <addPortMap(p); } } n = n.nextSibling(); //next channel } } };//end parser };//end viewer };//end tools };//end morpheo