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