Last change
on this file since 36 was
31,
checked in by rosiere, 17 years ago
|
Class Position qui encapsule la génération des fichiers de positions
|
File size:
1.1 KB
|
Rev | Line | |
---|
[29] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Include/ChangeCase.h" |
---|
| 9 | #include "Behavioural/include/Interface.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | |
---|
[31] | 14 | // string Interface::set_signal (Signal signal) |
---|
| 15 | // { |
---|
| 16 | // return set_signal(signal._name , |
---|
| 17 | // signal._direction, |
---|
| 18 | // signal._size ); |
---|
| 19 | // }; |
---|
[29] | 20 | |
---|
[31] | 21 | Signal * Interface::set_signal (string name , |
---|
| 22 | direction_t direction, |
---|
| 23 | uint32_t size , |
---|
| 24 | presence_port_t presence_port) |
---|
[29] | 25 | { |
---|
| 26 | string str_direction = toString(direction); |
---|
| 27 | string str_interface = _name; |
---|
| 28 | string str_signal = name; |
---|
| 29 | |
---|
| 30 | LowerCase(str_direction); |
---|
| 31 | UpperCase(str_interface); |
---|
| 32 | UpperCase(str_signal ); |
---|
| 33 | |
---|
| 34 | string signame = str_direction; |
---|
| 35 | if (_name != "") |
---|
| 36 | signame += "_"+str_interface; |
---|
| 37 | if (name != "") |
---|
| 38 | signame += "_"+str_signal; |
---|
| 39 | |
---|
[31] | 40 | Signal * sig = new Signal (signame , |
---|
| 41 | direction , |
---|
| 42 | size , |
---|
| 43 | presence_port); |
---|
| 44 | _list_signal->push_back (*sig); |
---|
[29] | 45 | |
---|
[31] | 46 | return sig; |
---|
[29] | 47 | }; |
---|
| 48 | |
---|
| 49 | }; // end namespace behavioural |
---|
| 50 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.