Last change
on this file since 134 was
94,
checked in by rosiere, 16 years ago
|
Update document on Vhdl generation.
|
-
Property svn:keywords set to
Id
|
File size:
869 bytes
|
Rev | Line | |
---|
[2] | 1 | /* |
---|
| 2 | * $Id: XML_get_body.cpp 94 2008-12-15 11:04:03Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/XML.h" |
---|
[94] | 9 | #include "Common/include/Tabulation.h" |
---|
[2] | 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | |
---|
[43] | 14 | #undef FUNCTION |
---|
| 15 | #define FUNCTION "XML::get_body" |
---|
[71] | 16 | std::string XML::get_body (void) |
---|
[2] | 17 | { |
---|
[43] | 18 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 19 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[2] | 20 | return _body; |
---|
| 21 | }; |
---|
| 22 | |
---|
[71] | 23 | std::string XML::get_body (uint32_t depth) |
---|
[3] | 24 | { |
---|
[43] | 25 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
| 26 | |
---|
[88] | 27 | std::string body = _body; |
---|
| 28 | std::string tab = indent(depth); |
---|
[3] | 29 | |
---|
[88] | 30 | body.insert(0,tab); |
---|
[83] | 31 | for (size_t pos=body.find('\n',0); (pos<body.length()-1); pos=body.find('\n',++pos)) |
---|
[88] | 32 | body.insert(++pos,tab); |
---|
[3] | 33 | |
---|
[43] | 34 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[3] | 35 | return body; |
---|
| 36 | }; |
---|
| 37 | |
---|
[2] | 38 | }; // end namespace behavioural |
---|
| 39 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.