Last change
on this file since 137 was
137,
checked in by rosiere, 14 years ago
|
Various modif (add test, and vhdl)
|
-
Property svn:keywords set to
Id
|
File size:
1.0 KB
|
Rev | Line | |
---|
[2] | 1 | /* |
---|
| 2 | * $Id: XML_header.cpp 137 2010-02-16 12:35:48Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/XML.h" |
---|
[137] | 9 | #include "Common/include/Environment.h" |
---|
[2] | 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | |
---|
[43] | 14 | #undef FUNCTION |
---|
| 15 | #define FUNCTION "XML::header" |
---|
[71] | 16 | void XML::header (std::string encoding) |
---|
[2] | 17 | { |
---|
[43] | 18 | log_printf(FUNC,Behavioural,FUNCTION,"Begin"); |
---|
[71] | 19 | |
---|
[137] | 20 | environment (); |
---|
| 21 | |
---|
[71] | 22 | time_t current_time; |
---|
| 23 | time (¤t_time); |
---|
| 24 | |
---|
| 25 | std::string str; |
---|
| 26 | |
---|
| 27 | str = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n"; |
---|
| 28 | str += "\n"; |
---|
| 29 | str += "<!--\n"; |
---|
[98] | 30 | str += "\t"+toString(_("File : ")) + _name + _filename_extension + "\n"; |
---|
| 31 | str += "\t"+toString(_("Date : ")) + ctime (¤t_time ); |
---|
| 32 | str += "\t"+toString(_("Version : ")) + MORPHEO_HEADER +"\n"; |
---|
| 33 | str += "\t"+toString(_("Comment : ")) + toString(_("it's a autogenerated file, don't modify")) +"\n"; |
---|
[71] | 34 | str += "-->\n"; |
---|
| 35 | str += "\n"; |
---|
| 36 | |
---|
| 37 | _body = str + _body; |
---|
| 38 | |
---|
[43] | 39 | log_printf(FUNC,Behavioural,FUNCTION,"End"); |
---|
[2] | 40 | }; |
---|
| 41 | |
---|
| 42 | }; // end namespace behavioural |
---|
| 43 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.