/* * * [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,int level){ string fichier; while( !n.isNull() ) { QDomElement e = n.toElement(); if( !e.isNull() ) { if( e.tagName() == "comment" ) { #ifdef DBUG_PARSE cout << "comment" <setComment(e.text().toStdString()); pos->setLevel(level); } if (e.tagName() == "entity" ) { #ifdef DBUG_PARSE cout << "entity" <setEntity(ent[level]); parser_pos(n.firstChild(),level); 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[level]->addport(p); } if (e.tagName() == "architecture" ) { #ifdef DBUG_PARSE cout << "architecture" <setArchitecture(arch[level]); base->addBaseP(pos,s); parser_pos(n.firstChild(),level); } if (e.tagName() == "component" ) { #ifdef DBUG_PARSE cout << "component" <addComponent(ctemp[level], e.attribute("name","").toStdString()); fichier=absolutePath; fichier.append(ent[level]->getName()); fichier.append("-"); fichier.append((e.attribute("type","").toLower()).toStdString()); fichier.append(".pos"); #ifdef DBUG_PARSE cout << fichier <get_BasePos((e.attribute("type","").toLower()).toStdString()); QList *sspor= (pt.getEntity())->getPort(); for(QList::iterator it=sspor->begin();it!=sspor->end();++it) ctemp[level]->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