Last change
on this file since 45 was
43,
checked in by rosiere, 17 years ago
|
Modif mineur : ajout d'info de débug
Release non stable
|
File size:
1.4 KB
|
Rev | Line | |
---|
[29] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Interfaces.h" |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | |
---|
[43] | 14 | #undef FUNCTION |
---|
| 15 | #define FUNCTION "Interfaces::get_interface" |
---|
[29] | 16 | string Interfaces::get_interface (void) |
---|
| 17 | { |
---|
[43] | 18 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 19 | |
---|
[29] | 20 | uint32_t depth = 0; |
---|
[31] | 21 | string separator = "\n"; |
---|
[29] | 22 | bool last_separator = false; |
---|
| 23 | |
---|
[40] | 24 | list<Interface_fifo*>::iterator i = _list_interface->begin(); |
---|
[31] | 25 | bool empty = _list_interface->empty(); |
---|
[29] | 26 | |
---|
| 27 | string tab = string(depth,'\t'); |
---|
| 28 | ostringstream text; |
---|
| 29 | |
---|
| 30 | if (not empty) |
---|
| 31 | { |
---|
| 32 | // First |
---|
[31] | 33 | if (i != _list_interface->end()) |
---|
[29] | 34 | { |
---|
[38] | 35 | text << tab << **i; |
---|
[29] | 36 | ++i; |
---|
| 37 | } |
---|
| 38 | |
---|
[31] | 39 | while (i != _list_interface->end()) |
---|
[29] | 40 | { |
---|
| 41 | text << separator; |
---|
[38] | 42 | text << tab << **i; |
---|
[29] | 43 | ++i; |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | if (last_separator) |
---|
| 47 | text << separator; |
---|
| 48 | } |
---|
| 49 | |
---|
[43] | 50 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 51 | |
---|
[29] | 52 | return text.str(); |
---|
| 53 | }; |
---|
| 54 | |
---|
[43] | 55 | #undef FUNCTION |
---|
| 56 | #define FUNCTION "Interfaces::get_interface_list" |
---|
[42] | 57 | list<Interface_fifo*>* Interfaces::get_interface_list (void) |
---|
| 58 | { |
---|
[43] | 59 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 60 | list<Interface_fifo*>* _return = _list_interface; |
---|
| 61 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
| 62 | |
---|
| 63 | return _return; |
---|
[42] | 64 | }; |
---|
| 65 | |
---|
[29] | 66 | }; // end namespace behavioural |
---|
| 67 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.