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