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

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

Almost complete design
with Test and test platform

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