Last change
on this file since 37 was
31,
checked in by rosiere, 17 years ago
|
Class Position qui encapsule la génération des fichiers de positions
|
File size:
685 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 | |
---|
[3] | 15 | void XML::generate_file (string encoding) |
---|
| 16 | { |
---|
| 17 | header (encoding); |
---|
| 18 | |
---|
| 19 | string name = _name; |
---|
[31] | 20 | string filename = name + "." + _filename_extension; |
---|
[3] | 21 | |
---|
| 22 | cout << "Generate file \""<< filename << "\"" << endl; |
---|
| 23 | |
---|
| 24 | ofstream file; |
---|
| 25 | file.open(filename.c_str(),ios::out | ios::trunc); |
---|
| 26 | |
---|
| 27 | file << get_body(); |
---|
| 28 | |
---|
| 29 | file.close(); |
---|
| 30 | }; |
---|
| 31 | |
---|
[2] | 32 | void XML::generate_file (void) |
---|
| 33 | { |
---|
[3] | 34 | generate_file("UTF-8"); |
---|
[2] | 35 | }; |
---|
| 36 | |
---|
| 37 | }; // end namespace behavioural |
---|
| 38 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.