00001 # ifndef WmhIdentify_h
00002 # define WmhIdentify_h WmhIdentify_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 # include "IdentifyComponent.h"
00021 # include <vector>
00022 # include <map>
00023
00024 namespace Conjecture {
00025 class Glyph;
00026 class PixFilt;
00027 class GlyphFeatures;
00028
00029
00035
00036 class WmhIdentify : public IdentifyComponent {
00037 public:
00038
00039 typedef std::map<wchar_t,GlyphFeatures*> Charset;
00040
00041
00042 WmhIdentify();
00043 virtual ~WmhIdentify();
00044
00045
00046
00047 inline const Charset & charset() const { return this->_charset; }
00048 inline const PixFilt* stdfilt() const { return this->_stdfilt; }
00049 inline const std::vector<PixFilt*> & filters() const { return this->_filters; }
00050
00051
00052
00053
00054
00055
00056 virtual bool execute(Page* page);
00057
00058 virtual bool execute(Glyph* glyph);
00059
00060 protected:
00061
00062
00063 inline void charsetIs(const Charset & charset) { this->_charset = charset; }
00064 inline void stdfiltIs(PixFilt* stdfilt) { this->_stdfilt = stdfilt; }
00065 inline void filtersIs(const std::vector<PixFilt*> & filters) { this->_filters = filters; }
00066
00067
00068
00069
00070 private:
00071
00072
00073 inline Charset & charsetRef() { return this->_charset; }
00074 inline PixFilt* & stdfiltRef() { return this->_stdfilt; }
00075 inline std::vector<PixFilt*> & filtersRef() { return this->_filters; }
00076
00077
00078
00079
00080
00081
00082
00094 Charset _charset;
00095
00100 PixFilt* _stdfilt;
00101
00103 std::vector<PixFilt*> _filters;
00104 };
00105 }
00106
00107 # endif // WmhIdentify_h
00108