# HG changeset patch # User pyon@macmini # Date 1319151503 -32400 # Node ID 1fda3a06c39b9633d6bdd20fe79da25adfd865cb # Parent dfa5cae8c992006e3a8979a69b87c03dc55e6a49 file name arrange. diff -r dfa5cae8c992 -r 1fda3a06c39b include/cache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/cache.h Fri Oct 21 07:58:23 2011 +0900 @@ -0,0 +1,38 @@ +// Filename : cache.h +// Last Change: 21-Oct-2011. +// +#ifndef __cache__ +#define __cache__ + +class CacheItem +{ +public: + wxString filename; // key + wxString fullpathname; + wxString z, l; + wxBitmap thumbnail; + bool marksheet; +}; + +WX_DECLARE_HASH_MAP( wxString, CacheItem*, wxStringHash, wxStringEqual, CacheHash ); + +class Cache +{ +public: + wxString key; + CacheHash ch; + wxString m_dir; + + bool IsCached( wxString file ); + void UpdateCache(); +}; + +bool Cache::IsCached( wxString file ) +{ + Cache* i = new Cache; + return false; +} + + +#endif // __cache__ + diff -r dfa5cae8c992 -r 1fda3a06c39b include/marksheet.h --- a/include/marksheet.h Thu Oct 20 07:44:56 2011 +0900 +++ b/include/marksheet.h Fri Oct 21 07:58:23 2011 +0900 @@ -1,8 +1,8 @@ // Filename : marksheet.h -// Last Change: 19-Oct-2011. +// Last Change: 21-Oct-2011. // -#ifndef __MARKSHEET__ -#define __MARKSHEET__ +#ifndef __marksheet__ +#define __marksheet__ bool IsBlack( int r, int g, int b ) { @@ -89,5 +89,5 @@ return false; }; -#endif // __MARKSHEET__ +#endif // __marksheet__ diff -r dfa5cae8c992 -r 1fda3a06c39b include/myutils.h --- a/include/myutils.h Thu Oct 20 07:44:56 2011 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -// Filename : myutils.h -// Last Change: 20-Oct-2011. -// -#ifndef __myutils__ -#define __myutils__ - -/********** Marksheet **********/ -bool IsBlack( int r, int g, int b ) -{ - if ( r == 0 && g == 0 && b == 0 ) { - return true; - } - return false; -}; - -wxString GuessHhs( wxString& file ) -{ - wxString hhs; - wxImage img( file, wxBITMAP_TYPE_JPEG ); - int sx = 1800; // start x - int sy = 315;; // start y - int bw = 60; // block width - int bh = 50; // block height - int area = bw * bh; - int black = 0; - int x, y; - unsigned char r, g, b; - - int max_n; - float max; - float bk; - for ( int c=0; c<10; c++ ) { - max = 0.0; - max_n = -1; - for ( int n=0; n<10; n++ ) { - - for ( x=sx+bw*c; xCentre( wxBOTH ); - CacheHash cache; + Cache cache; } // destructor