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