Last change
on this file since 61 was
57,
checked in by rosiere, 17 years ago
|
- VHDL - RegisterFile_Multi_Banked (only partial_crossbar)
- SystemC - modif Component, interface and co -> ajout du type Tusage_T pour instancier un coposant mais ne demander que le VHDL ou le systemC.
- Séminaire interne
|
File size:
1.1 KB
|
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 | |
---|
[43] | 13 | #undef FUNCTION |
---|
| 14 | #define FUNCTION "Component::get_component" |
---|
| 15 | |
---|
[42] | 16 | string Component::get_component (void) |
---|
[31] | 17 | { |
---|
[43] | 18 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 19 | |
---|
[31] | 20 | uint32_t depth = 0; |
---|
| 21 | string separator = "\n"; |
---|
| 22 | bool last_separator = false; |
---|
| 23 | |
---|
[57] | 24 | list<Tcomponent_t *>::iterator i = _list_component->begin(); |
---|
[31] | 25 | bool empty = _list_component->empty(); |
---|
| 26 | |
---|
| 27 | string tab = string(depth,'\t'); |
---|
| 28 | ostringstream text; |
---|
| 29 | |
---|
| 30 | if (not empty) |
---|
| 31 | { |
---|
| 32 | // First |
---|
| 33 | if (i != _list_component->end()) |
---|
| 34 | { |
---|
[57] | 35 | text << tab << *((*i)->_entity); |
---|
[31] | 36 | ++i; |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | while (i != _list_component->end()) |
---|
| 40 | { |
---|
| 41 | text << separator; |
---|
[57] | 42 | text << tab << *((*i)->_entity); |
---|
[31] | 43 | ++i; |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | if (last_separator) |
---|
| 47 | text << separator; |
---|
| 48 | } |
---|
| 49 | |
---|
[43] | 50 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 51 | |
---|
[31] | 52 | return text.str(); |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | }; // end namespace behavioural |
---|
| 56 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.