Last change
on this file since 42 was
42,
checked in by rosiere, 17 years ago
|
Modification des classes d'encapsulation des interfaces :
- gère les signaux à écrire dans le vhdl
- les traces pour le testbench
- la génération des vhdl structurelles
-> test sur la Pattern History Table
|
File size:
950 bytes
|
Rev | Line | |
---|
[31] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
[42] | 8 | #include "Behavioural/include/Component.h" |
---|
[31] | 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | |
---|
[42] | 13 | string Component::get_component (void) |
---|
[31] | 14 | { |
---|
| 15 | uint32_t depth = 0; |
---|
| 16 | string separator = "\n"; |
---|
| 17 | bool last_separator = false; |
---|
| 18 | |
---|
| 19 | list<Entity *>::iterator i = _list_component->begin(); |
---|
| 20 | bool empty = _list_component->empty(); |
---|
| 21 | |
---|
| 22 | string tab = string(depth,'\t'); |
---|
| 23 | ostringstream text; |
---|
| 24 | |
---|
| 25 | if (not empty) |
---|
| 26 | { |
---|
| 27 | // First |
---|
| 28 | if (i != _list_component->end()) |
---|
| 29 | { |
---|
| 30 | text << tab << **i; |
---|
| 31 | ++i; |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | while (i != _list_component->end()) |
---|
| 35 | { |
---|
| 36 | text << separator; |
---|
| 37 | text << tab << **i; |
---|
| 38 | ++i; |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | if (last_separator) |
---|
| 42 | text << separator; |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | return text.str(); |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | }; // end namespace behavioural |
---|
| 49 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.