source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp @ 71

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

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

File size: 928 bytes
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/XML.h"
9#include <fstream>
10
11namespace morpheo              {
12namespace behavioural          {
13
14#undef  FUNCTION
15#define FUNCTION "XML::generate_file"
16  void XML::generate_file (std::string encoding)
17  {
18    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
19
20    header (encoding);
21
22    std::string filename =  _name + "." + _filename_extension;
23
24    std::cout << "Generate file \""<< filename << "\"" << std::endl;
25
26    std::ofstream file;
27    file.open(filename.c_str(),std::ios::out | std::ios::trunc);
28
29    file << get_body();
30
31    file.close();
32
33    log_printf(FUNC,Behavioural,FUNCTION,"End");
34  };
35
36  void XML::generate_file (void)
37  {
38    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
39    generate_file("UTF-8");
40    log_printf(FUNC,Behavioural,FUNCTION,"End");
41  };
42
43}; // end namespace behavioural         
44}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.