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:
1.3 KB
|
Line | |
---|
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 | /* |
---|
12 | * search and find the signal |
---|
13 | * top : actual component is viewed on screen |
---|
14 | * c: the component (source) which is connected to the dest |
---|
15 | * dest : the port destination informations |
---|
16 | */ |
---|
17 | morpheo::tools::viewer::bdd::Signal *BaseV::getSignal(BaseP *top,string c,morpheo::tools::viewer::bdd::PortMap *dest) |
---|
18 | { |
---|
19 | int srcX,srcY,destX,destY; |
---|
20 | Architecture *aa=top->getArchitecture(); |
---|
21 | morpheo::tools::viewer::bdd::Component x=aa->getComponent(c); |
---|
22 | // cout << dest->getName() <<endl; |
---|
23 | morpheo::tools::viewer::bdd::Port *p= x.searchPort(dest->getName()); |
---|
24 | srcX=p->get_x(); |
---|
25 | srcY=p->get_y(); |
---|
26 | morpheo::tools::viewer::bdd::Port *pm; |
---|
27 | if(dest->getComponent()==(top->getEntity())->getName()) |
---|
28 | { |
---|
29 | //cout << dest->getComponent() <<endl; |
---|
30 | morpheo::tools::viewer::bdd::BaseP res=get_BasePos(dest->getComponent()); |
---|
31 | pm=(res.getEntity())->searchPort(dest->getPort()); |
---|
32 | } |
---|
33 | else |
---|
34 | { |
---|
35 | x=aa->getComponent(dest->getComponent()); |
---|
36 | pm= x.searchPort(dest->getPort()); |
---|
37 | } |
---|
38 | destX=pm->get_x(); |
---|
39 | destY=pm->get_y(); |
---|
40 | |
---|
41 | morpheo::tools::viewer::bdd::Signal *s=new Signal(srcX,srcY,destX,destY); |
---|
42 | return s; |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | };//end bdd |
---|
47 | };//end viewer |
---|
48 | };//end tools |
---|
49 | };//end morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.