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

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