00001 #ifndef __HISTORY_HPP__
00002 #define __HISTORY_HPP__
00003
00004 #include <QObject>
00005 #include <iostream>
00006 #include <fstream>
00007 #include <map>
00008 #include <list>
00009 #include "history_.hpp"
00010 #include "event.hpp"
00011
00012 using namespace std;
00020 class History : public QObject {
00021 Q_OBJECT
00022
00023 protected:
00024 map<unsigned int, History_> _animalHist;
00025
00026 list<Event> _eventHist;
00027
00028 public slots:
00033 void saveToMFile(string fname);
00034
00035 public:
00039 History();
00040
00048 void add(unsigned int ID, AnimalParam ¶m, unsigned int t);
00049
00058 AnimalParam get(unsigned int ID, unsigned int t);
00059
00065 void addEvent(Event &ev);
00066
00074 void getEvent(unsigned int t, list<Event> &ret);
00075
00076
00077 };
00078
00079 #endif
00080