00001
00002
00003
00004
00005 #ifndef _STATS_H_
00006 #define _STATS_H_
00007
00008 #include <config.h>
00009
00010 #include <ctime>
00011 #include <set>
00012 #include <string>
00013 #include <vector>
00014
00015 namespace Limiro
00016 {
00017
00019 class TimeVal
00020 {
00021 public:
00023 TimeVal(std::time_t t, float val) {time = t; value=val;};
00024 std::time_t time;
00025 float value;
00026 std::set<std::string> files;
00027 };
00028
00029 class Stats
00030 {
00031 public:
00032 Stats();
00033
00034 bool readLogFile(const std::string& filename);
00035
00036 std::vector<TimeVal> getExerciseHistory(const std::string& catalogFilename, std::time_t begin, std::time_t end=0);
00037
00038 private:
00039 std::vector<TimeVal> m_exercises;
00040
00041 };
00042
00043 }
00044
00045 #endif // _STATS_H_