diff options
author | sgeerken <devnull@localhost> | 2012-06-25 16:53:21 +0200 |
---|---|---|
committer | sgeerken <devnull@localhost> | 2012-06-25 16:53:21 +0200 |
commit | 466943b3be2ebdedf4949103993c4625775385ca (patch) | |
tree | 6c6f49920bc2d87036eb32dda1cf7d43f1898e20 /dw/hyphenator.hh | |
parent | 6af0048a5a0df6bbcc3785f17418a6fca31eeac6 (diff) |
Static hash map for hyphenators. Patterns are loaded from /usr/local/lib/dillo/hyphenation.
Diffstat (limited to 'dw/hyphenator.hh')
-rw-r--r-- | dw/hyphenator.hh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/dw/hyphenator.hh b/dw/hyphenator.hh index 089680bc..97de965f 100644 --- a/dw/hyphenator.hh +++ b/dw/hyphenator.hh @@ -7,9 +7,14 @@ namespace dw { -class Hyphenator +class Hyphenator: public lout::object::Object { private: + static lout::container::typed::HashTable + <lout::object::TypedPair <lout::object::TypedPointer <core::Platform>, + lout::object::ConstString>, + Hyphenator> *hyphenators; + /* * Actually, only one method in Platform is needed: * textToLower(). And, IMO, this method is actually not platform @@ -23,6 +28,10 @@ private: public: Hyphenator (core::Platform *platform, const char *filename); + ~Hyphenator(); + + static Hyphenator *getHyphenator (core::Platform *platform, + const char *language); lout::container::typed::Vector <lout::object::String> *hyphenateWord(const char *word); |