Compatibility updates; Boost Regex is now statically linked, changed to <hunspell/hunspell.hxx>

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1286 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2009-01-02 21:52:08 +00:00
parent ab5ea48a9d
commit 46dda0ef30
7 changed files with 397 additions and 309 deletions
+7 -7
View File
@@ -4,13 +4,13 @@
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_UTIL_SPELL_CHECKER
#define HEADER_UTIL_SPELL_CHECKER
#ifndef HEADER_UTIL_SPELL_CHECKER
#define HEADER_UTIL_SPELL_CHECKER
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include "hunspell.hxx"
#include "hunspell/hunspell.hxx"
DECLARE_POINTER_TYPE(SpellChecker);
@@ -33,20 +33,20 @@ class SpellChecker : public Hunspell, public IntrusivePtrBase<SpellChecker> {
static SpellChecker& get(const String& filename, const String& language);
/// Destroy all cached SpellChecker objects
static void destroyAll();
/// Check the spelling of a single word
bool spell(const String& word);
/// Check the spelling of a single word, ignore punctuation
bool spell_with_punctuation(const String& word);
/// Give spelling suggestions
void suggest(const String& word, vector<String>& suggestions_out);
private:
/// Convert between String and dictionary encoding
wxCSConv encoding;
bool convert_encoding(const String& word, CharBuffer& out);
SpellChecker(const char* aff_path, const char* dic_path);
static map<String,SpellCheckerP> spellers; //< Cached checkers for each language
};