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

Last change on this file since 95 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
RevLine 
[2]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"
[85]9#include "Behavioural/include/Version.h"
[2]10
11namespace morpheo              {
12namespace behavioural          {
13
[43]14#undef  FUNCTION
15#define FUNCTION "XML::header"
[71]16  void XML::header (std::string encoding)
[2]17  {
[43]18    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
[71]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";
[88]28    str += "\t"+toString(_("File : "))            + _name + _filename_extension + "\n";
[85]29    str += "\t"+toString(_("Date : "))            + ctime (&current_time );
[88]30    str += "\t"+toString(_("Morpheo version : ")) + MORPHEO_HEADER +"\n";
[85]31    str += "\t"+toString(_("Comment : "))         + toString(_("it's a autogenerated file, don't modify")) +"\n";
[71]32    str += "-->\n";
33    str += "\n";
34
35    _body = str + _body;
36
[43]37    log_printf(FUNC,Behavioural,FUNCTION,"End");
[2]38  };
39
40}; // end namespace behavioural         
41}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.