#ifdef STATISTICS /* * $Id$ * * [ Description ] * */ #include "Behavioural/include/Statistics.h" #include #include #include using namespace std; namespace morpheo { namespace behavioural { #undef FUNCTION #define FUNCTION "Statistics::generate_file" void Statistics::generate_file(string stat) { log_printf(FUNC,Behavioural,FUNCTION,"Begin"); ostringstream filename; filename << _name << ".stat"; cout << "Generate file \""<< filename.str() << "\"" << endl; ofstream file; file.open(filename.str().c_str(),ios::out | ios::trunc); time_t current_time; time (¤t_time); // print header file << "" << endl << endl; file << stat; file.close(); log_printf(FUNC,Behavioural,FUNCTION,"End"); } #undef FUNCTION #define FUNCTION "Statistics::generate_file" void Statistics::generate_file(void) { log_printf(FUNC,Behavioural,FUNCTION,"Begin"); generate_file(print(0)); log_printf(FUNC,Behavioural,FUNCTION,"End"); }; }; // end namespace behavioural }; // end namespace morpheo #endif