Last change
on this file since 87 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:
928 bytes
|
Line | |
---|
1 | /* |
---|
2 | * $Id: XML_generate_file.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/include/XML.h" |
---|
9 | #include <fstream> |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace 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.