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

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 912 bytes
Line 
1/*
2 * $Id: XML_header.cpp 81 2008-04-15 18:40:01Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/XML.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
13#undef  FUNCTION
14#define FUNCTION "XML::header"
15  void XML::header (std::string encoding)
16  {
17    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
18
19    time_t current_time;
20    time (&current_time);
21
22    std::string str_time = ctime (&current_time );
23
24    std::string str;
25
26    str  = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n";
27    str += "\n";
28    str += "<!--\n";
29    str += "\tFile        : " + _name+"."+_filename_extension + "\n";
30    str += "\tDate        : " + str_time;
31    str += "\tComment     : 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.