Last change
on this file since 32 was
31,
checked in by rosiere, 17 years ago
|
Class Position qui encapsule la génération des fichiers de positions
|
File size:
936 bytes
|
Rev | Line | |
---|
[29] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Interface.h" |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | |
---|
| 14 | string Interface::get_signal (void) |
---|
| 15 | { |
---|
| 16 | uint32_t depth = 0; |
---|
| 17 | string separator = ",\n"; |
---|
| 18 | bool last_separator = false; |
---|
| 19 | |
---|
| 20 | |
---|
[31] | 21 | list<Signal>::iterator i = _list_signal->begin(); |
---|
| 22 | bool empty = _list_signal->empty(); |
---|
[29] | 23 | |
---|
| 24 | string tab = string(depth,'\t'); |
---|
| 25 | ostringstream text; |
---|
| 26 | |
---|
| 27 | if (not empty) |
---|
| 28 | { |
---|
| 29 | // First |
---|
[31] | 30 | if (i != _list_signal->end()) |
---|
[29] | 31 | { |
---|
| 32 | text << tab << *i; |
---|
| 33 | ++i; |
---|
| 34 | } |
---|
| 35 | |
---|
[31] | 36 | while (i != _list_signal->end()) |
---|
[29] | 37 | { |
---|
| 38 | text << separator; |
---|
| 39 | text << tab << *i; |
---|
| 40 | ++i; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | if (last_separator) |
---|
| 44 | text << separator; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | return text.str(); |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | }; // end namespace behavioural |
---|
| 51 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.