00001 #ifndef __HISTORY__HPP__ 00002 #define __HISTORY__HPP__ 00003 00004 #include <iostream> 00005 #include <fstream> 00006 #include <list> 00007 #include "animalParam.hpp" 00008 00009 using namespace std; 00017 class HistoryStruct { 00018 public: 00019 AnimalParam param; 00020 unsigned int t; 00021 }; 00022 00023 class History_ { 00024 private: 00025 HistoryStruct _tmpHist; //< rezerwacja miejsca na strukture */ 00026 list<HistoryStruct>::iterator _iterStory; //< iterator parametrow */ 00027 00028 protected: 00029 list<HistoryStruct> _story; //< parametry w danym momencie */ 00030 00031 public: 00035 History_(); 00036 00043 void add(AnimalParam ¶m, unsigned int t); 00044 00051 AnimalParam get(unsigned int t); 00052 00053 00061 void saveToMFile(fstream &plik, unsigned int i); 00062 00063 }; 00064 00065 #endif 00066