00001 # ifndef Conjecture_WmhIdentify_h
00002 # define Conjecture_WmhIdentify_h Conjecture_WmhIdentify_h
00003
00004
00005
00006
00007
00008 # include "IdentifyComponent.h"
00009 # include <vector>
00010 # include <map>
00011
00012 namespace Conjecture {
00013 class Glyph;
00014 class PixFilt;
00015 class GlyphFeatures;
00016
00026 class WmhIdentify : public IdentifyComponent {
00027 public:
00028
00029 typedef std::map<wchar_t,GlyphFeatures*> Charset;
00030
00031
00032 WmhIdentify();
00033 virtual ~WmhIdentify();
00034
00035
00036 inline const Charset & charset() const { return this->_charset; }
00037 inline const PixFilt* stdfilt() const { return this->_stdfilt; }
00038 inline const std::vector<PixFilt*> & filters() const { return this->_filters; }
00039
00040
00041 virtual bool execute(Page* page);
00042
00043 virtual bool execute(Glyph* glyph);
00044
00045 protected:
00046
00047 inline void charsetIs(const Charset & charset) { this->_charset = charset; }
00048 inline void stdfiltIs(PixFilt* stdfilt) { this->_stdfilt = stdfilt; }
00049 inline void filtersIs(const std::vector<PixFilt*> & filters) { this->_filters = filters; }
00050
00051
00052
00053 private:
00054
00055 inline Charset & charsetRef() { return this->_charset; }
00056 inline PixFilt* & stdfiltRef() { return this->_stdfilt; }
00057 inline std::vector<PixFilt*> & filtersRef() { return this->_filters; }
00058
00059
00060
00061
00062
00077 Charset _charset;
00078
00086 PixFilt* _stdfilt;
00087
00092 std::vector<PixFilt*> _filters;
00093 };
00094 }
00095
00096 # endif // Conjecture_WmhIdentify_h
00097