source: trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/ListePorts_getPortEast.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 978 bytes
Line 
1/*
2 *
3 * [desc.]
4 */
5#include "Tools/Viewer/Bdd/include/ListePorts.h"
6
7namespace morpheo{
8namespace tools{
9namespace viewer{
10namespace bdd{     
11 
12   /*p_x : centre abs; p_y : centre ordonnée ; s_x s_y : size entiere */
13  /*
14  *     x-------x
15  *     |       |
16  *     |   Â°   |
17  *     \       \
18  */
19  QList<morpheo::tools::viewer::bdd::Port> ListePorts::getPortEast(Coord *c){
20
21    int count=1;
22    int nb=countPort("east"); 
23   
24
25    QList<morpheo::tools::viewer::bdd::Port> *result=new \
26      QList<morpheo::tools::viewer::bdd::Port>();
27
28    for(QList<morpheo::tools::viewer::bdd::Port>::iterator it\
29          = ports->begin();it!=ports->end();++it)
30      {
31        if( !strcmp("east",it->getLocalisation().c_str()))
32          {
33            it->set_y( (c->get_bd_y())-(c->get_size_y()) + count*((c->get_size_y())/(nb+1)) );
34            it->set_x( c->get_bd_x() ); 
35            result->append(*it);
36            count ++;
37          }
38      }
39    return *result;
40  }
41
42
43};//end bdd
44};//end viewer
45};//end tools
46};//end morpheo
Note: See TracBrowser for help on using the repository browser.