source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_header.cpp

Last change on this file was 137, checked in by rosiere, 14 years ago

Various modif (add test, and vhdl)

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1/*
2 * $Id: XML_header.cpp 137 2010-02-16 12:35:48Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/XML.h"
9#include "Common/include/Environment.h"
10
11namespace morpheo              {
12namespace behavioural          {
13
14#undef  FUNCTION
15#define FUNCTION "XML::header"
16  void XML::header (std::string encoding)
17  {
18    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
19
20    environment ();
21
22    time_t current_time;
23    time (&current_time);
24
25    std::string str;
26
27    str  = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n";
28    str += "\n";
29    str += "<!--\n";
30    str += "\t"+toString(_("File    : ")) + _name + _filename_extension + "\n";
31    str += "\t"+toString(_("Date    : ")) + ctime (&current_time );
32    str += "\t"+toString(_("Version : ")) + MORPHEO_HEADER +"\n";
33    str += "\t"+toString(_("Comment : ")) + toString(_("it's a autogenerated file, don't modify")) +"\n";
34    str += "-->\n";
35    str += "\n";
36
37    _body = str + _body;
38
39    log_printf(FUNC,Behavioural,FUNCTION,"End");
40  };
41
42}; // end namespace behavioural         
43}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.