source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp @ 94

Last change on this file since 94 was 94, checked in by rosiere, 16 years ago

Update document on Vhdl generation.

  • Property svn:keywords set to Id
File size: 869 bytes
Line 
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"
9#include "Common/include/Tabulation.h"
10
11namespace morpheo              {
12namespace behavioural          {
13
14#undef  FUNCTION
15#define FUNCTION "XML::get_body"
16  std::string XML::get_body (void)
17  {
18    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
19    log_printf(FUNC,Behavioural,FUNCTION,"End");
20    return _body;
21  };
22
23  std::string XML::get_body (uint32_t depth)
24  {
25    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
26
27    std::string body = _body;
28    std::string tab  = indent(depth);
29
30    body.insert(0,tab);
31    for (size_t pos=body.find('\n',0); (pos<body.length()-1); pos=body.find('\n',++pos))
32      body.insert(++pos,tab);
33
34    log_printf(FUNC,Behavioural,FUNCTION,"End");
35    return body;
36  };
37
38}; // end namespace behavioural         
39}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.