[26] | 1 | /* |
---|
[20] | 2 | * |
---|
[32] | 3 | * [BaseV_afficheBaseConsole] |
---|
| 4 | * debug : show contents of position file in memory |
---|
[20] | 5 | */ |
---|
| 6 | #include "Tools/Viewer/Bdd/include/BaseV.h" |
---|
| 7 | |
---|
| 8 | namespace morpheo{ |
---|
| 9 | namespace tools{ |
---|
| 10 | namespace viewer{ |
---|
| 11 | namespace bdd{ |
---|
| 12 | void BaseV::afficheBaseConsole(){ |
---|
| 13 | for ( QList<BaseP>::iterator it\ |
---|
| 14 | = pos->begin(); it != pos->end(); ++it) |
---|
| 15 | { |
---|
[26] | 16 | |
---|
[20] | 17 | morpheo::tools::viewer::bdd::Entity *test=(it->getEntity()); |
---|
| 18 | string n2=test->getName(); |
---|
| 19 | string n=it->getComment(); |
---|
| 20 | cout << n << endl ; |
---|
| 21 | cout << "----Entity-----------------------------------------" <<endl; |
---|
[26] | 22 | cout << "Entity name:"<< n2 <<" level:"<< it->getLevel()<< endl; |
---|
[20] | 23 | cout << "------------------ports east-----------------------" <<endl; |
---|
| 24 | |
---|
| 25 | QList<Port> porteast=test->getPortEast(new Coord(50,50,50,50)); |
---|
| 26 | for (QList<Port>::iterator it2\ |
---|
| 27 | = porteast.begin(); it2 != porteast.end(); ++it2) |
---|
| 28 | { |
---|
| 29 | cout << "name : " <<it2->getName() << endl; |
---|
| 30 | cout << it2->getComment() << endl; |
---|
| 31 | cout << "x:"<<it2->get_x() << endl; |
---|
| 32 | cout << "y:"<<it2->get_y() << endl; |
---|
| 33 | cout << "direction : " <<it2->getDirection()<< endl; |
---|
| 34 | cout << endl; |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | cout << "-----------------ports west-------------------------" <<endl; |
---|
| 39 | QList<Port> portwest=test->getPortWest(new Coord(50,50,50,50)); |
---|
| 40 | for (QList<Port>::iterator it2\ |
---|
| 41 | = portwest.begin(); it2 != portwest.end(); ++it2) |
---|
| 42 | { |
---|
| 43 | cout << "name : " << it2->getName() << endl; |
---|
| 44 | cout << it2->getComment() << endl; |
---|
| 45 | cout << "x:"<<it2->get_x() << endl; |
---|
| 46 | cout << "y:"<<it2->get_y() << endl; |
---|
| 47 | cout << "direction : " <<it2->getDirection()<< endl; |
---|
| 48 | cout << endl; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | cout << "-----------------ports south---------------------------" <<endl; |
---|
| 53 | |
---|
| 54 | QList<Port> portsouth=test->getPortSouth(new Coord(50,50,50,50)); |
---|
| 55 | for (QList<Port>::iterator it2\ |
---|
| 56 | = portsouth.begin(); it2 != portsouth.end(); ++it2) |
---|
| 57 | { |
---|
| 58 | cout << "name : " << it2->getName() << endl; |
---|
| 59 | cout << it2->getComment() << endl; |
---|
| 60 | cout << "x:"<<it2->get_x() << endl; |
---|
| 61 | cout << "y:"<<it2->get_y() << endl; |
---|
| 62 | cout << "direction :" << it2->getDirection()<< endl; |
---|
| 63 | cout << endl; |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | cout << "-----------------ports north---------------------------" <<endl; |
---|
| 67 | QList<Port> portnorth=test->getPortNorth(new Coord(50,50,50,50)); |
---|
| 68 | for (QList<Port>::iterator it2\ |
---|
| 69 | = portnorth.begin(); it2 != portnorth.end(); ++it2) |
---|
| 70 | { |
---|
| 71 | cout << "name : " << it2->getName() << endl; |
---|
| 72 | cout << it2->getComment() << endl; |
---|
| 73 | cout << "x:"<<it2->get_x() << endl; |
---|
| 74 | cout << "y:"<<it2->get_y() << endl; |
---|
| 75 | cout << "direction :" << it2->getDirection()<< endl; |
---|
| 76 | cout << endl; |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | if (it->getArchitecture()!=NULL){ |
---|
| 80 | |
---|
| 81 | cout << "----architecture--------------------------------------" <<endl; |
---|
| 82 | |
---|
| 83 | QList<Component> *c=new QList<Component>\ |
---|
| 84 | (*((it->getArchitecture())->getComponent()) ); |
---|
| 85 | for (QList<Component>::iterator it2\ |
---|
| 86 | = c->begin(); it2 != c->end(); ++it2) |
---|
| 87 | { |
---|
| 88 | cout << "--------component--------------------------------------" <<endl; |
---|
| 89 | cout << "name :" << it2->getName() <<endl; |
---|
| 90 | |
---|
| 91 | cout << "comment :" << it2->getComment() <<endl; |
---|
| 92 | cout << "x:"<<(it2->get_x()) << endl; |
---|
| 93 | cout << "y:"<<(it2->get_y()) << endl; |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | QList<PortMap> *pm=new QList<PortMap>(*(it2->getPortMap())); |
---|
| 97 | for (QList<PortMap>::iterator it3\ |
---|
| 98 | = pm->begin(); it3 != pm->end(); ++it3) |
---|
| 99 | { |
---|
| 100 | cout << "------------------portmap----------------------------" <<endl; |
---|
| 101 | cout << "name :" << it3->getName() <<endl; |
---|
| 102 | cout << "port :" << it3->getPort() <<endl; |
---|
| 103 | cout << "comment :" << it3->getComment() <<endl; |
---|
[26] | 104 | |
---|
[20] | 105 | |
---|
[26] | 106 | |
---|
[20] | 107 | } |
---|
| 108 | } |
---|
| 109 | }//if |
---|
[26] | 110 | cout << endl<< "************ fin BASEP *******************"<<endl <<endl; |
---|
| 111 | |
---|
[20] | 112 | }//for |
---|
[26] | 113 | |
---|
[20] | 114 | } |
---|
| 115 | |
---|
| 116 | };//end bdd |
---|
| 117 | };//end viewer |
---|
| 118 | };//end tools |
---|
| 119 | };//end morpheo |
---|