Mercurial > mercurial > hgweb_mover2.cgi
comparison include/cache.h @ 11:9b0840b0be7e
cache done.
| author | pyon@macmini |
|---|---|
| date | Sun, 23 Oct 2011 07:43:34 +0900 |
| parents | 1fda3a06c39b |
| children | 6ed3b64ed39a |
comparison
equal
deleted
inserted
replaced
| 10:1fda3a06c39b | 11:9b0840b0be7e |
|---|---|
| 1 // Filename : cache.h | 1 // Filename : cache.h |
| 2 // Last Change: 21-Oct-2011. | 2 // Last Change: 22-Oct-2011. |
| 3 // | 3 // |
| 4 #ifndef __cache__ | 4 #ifndef __cache__ |
| 5 #define __cache__ | 5 #define __cache__ |
| 6 | 6 |
| 7 class CacheItem | 7 class CacheItem |
| 8 { | 8 { |
| 9 public: | 9 public: |
| 10 wxString filename; // key | 10 wxString filename; // key |
| 11 wxString fullpathname; | 11 wxString fullpathname; |
| 12 wxString z, l; | 12 wxString modtime; |
| 13 float z; | |
| 14 long l; | |
| 15 bool marksheet; | |
| 13 wxBitmap thumbnail; | 16 wxBitmap thumbnail; |
| 14 bool marksheet; | 17 bool exists; |
| 15 }; | 18 }; |
| 16 | |
| 17 WX_DECLARE_HASH_MAP( wxString, CacheItem*, wxStringHash, wxStringEqual, CacheHash ); | |
| 18 | |
| 19 class Cache | |
| 20 { | |
| 21 public: | |
| 22 wxString key; | |
| 23 CacheHash ch; | |
| 24 wxString m_dir; | |
| 25 | |
| 26 bool IsCached( wxString file ); | |
| 27 void UpdateCache(); | |
| 28 }; | |
| 29 | |
| 30 bool Cache::IsCached( wxString file ) | |
| 31 { | |
| 32 Cache* i = new Cache; | |
| 33 return false; | |
| 34 } | |
| 35 | 19 |
| 36 | 20 |
| 37 #endif // __cache__ | 21 #endif // __cache__ |
| 38 | 22 |
