/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/XML.h"

namespace morpheo              {
namespace behavioural          {

#undef  FUNCTION
#define FUNCTION "XML::header"
  void XML::header (std::string encoding)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");

    time_t current_time;
    time (&current_time);

    std::string str_time = ctime (&current_time );

    std::string str;

    str  = "<?xml version=\"1.0\" encoding=\""+encoding+"\" ?>\n";
    str += "\n";
    str += "<!--\n";
    str += "\tFile        : " + _name+"."+_filename_extension + "\n";
    str += "\tDate        : " + str_time +"\n";
    str += "\tComment     : it's a autogenerated file : don't modify\n";
    str += "-->\n";
    str += "\n";

    _body = str + _body;

    log_printf(FUNC,Behavioural,FUNCTION,"End");
  };

}; // end namespace behavioural          
}; // end namespace morpheo              
