#ifdef STATISTICS #ifndef morpheo_behavioural_Statistics_save_cpp #define morpheo_behavioural_Statistics_save_cpp /* * $Id$ * * [ Description ] * */ #include "Behavioural/include/Statistics.h" namespace morpheo { namespace behavioural { template void Statistics::save(Counters ** & counters, Parameters_Counters parameters) { // Allocation of a new slot -> take param a first count Counters ** counters_tmp; counters_tmp = new Counters * [_nb_statistics+1]; // Copy for (uint32_t i = 0; i < _nb_statistics; i ++) counters_tmp [i] = counters [i]; // New slot ! counters_tmp [_nb_statistics] = new Counters (parameters); // update pointer counters = counters_tmp; _nb_statistics ++; }; }; // end namespace behavioural }; // end namespace morpheo #endif #endif