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