Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Friends

SpellChecker Class Reference

#include <spell_manager.h>

Inheritance diagram for SpellChecker:

List of all members.

Public Types

enum  SpellCheckResult { LOOKUP_SUCCEEDED = 0, LOOKUP_FAILED = 1, LOOKUP_ERROR = 2 }

Public Member Functions

SpellCheckResult checkWord (const UT_UCSChar *word, size_t len)
UT_GenericVector< UT_UCSChar * > * suggestWord (const UT_UCSChar *word, size_t len)
virtual UT_VectorgetMapping ()
virtual bool doesDictionaryExist (const char *)
virtual bool addToCustomDict (const UT_UCSChar *word, size_t len)
virtual void correctWord (const UT_UCSChar *toCorrect, size_t toCorrectLen, const UT_UCSChar *correct, size_t correctLen)
virtual void ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen)=0
virtual bool isIgnored (const UT_UCSChar *pWord, size_t len) const =0
const UT_StringgetLanguage () const
bool requestDictionary (const char *szLang)
bool isDictionaryFound (void)
void setDictionaryFound (bool b)

Protected Member Functions

 SpellChecker ()
virtual ~SpellChecker ()
void setLanguage (const char *lang)

Static Protected Member Functions

static void couldNotLoadDictionary (const char *szLang)

Protected Attributes

UT_String m_sLanguage
BarbarismChecker m_BarbarismChecker
UT_Vector m_vecEmpty
bool m_bIsBarbarism
bool m_bIsDictionaryWord
bool m_bFoundDictionary

Private Member Functions

 SpellChecker (const SpellChecker &)
void operator= (const SpellChecker &)
virtual bool _requestDictionary (const char *szLang)=0
virtual SpellCheckResult _checkWord (const UT_UCSChar *word, size_t len)=0
virtual UT_GenericVector
< UT_UCSChar * > * 
_suggestWord (const UT_UCSChar *word, size_t len)=0


class SpellManager

Member Enumeration Documentation


Constructor & Destructor Documentation

SpellChecker::SpellChecker (  )  [protected]

Abstract constructor

SpellChecker::~SpellChecker (  )  [protected, virtual]

Abstract destructor

SpellChecker::SpellChecker ( const SpellChecker  )  [private]

Member Function Documentation

virtual SpellCheckResult SpellChecker::_checkWord ( const UT_UCSChar word,
size_t  len 
) [private, pure virtual]

Implemented in EnchantChecker.

Referenced by checkWord().

virtual bool SpellChecker::_requestDictionary ( const char *  szLang  )  [private, pure virtual]

Implemented in EnchantChecker.

Referenced by requestDictionary().

virtual UT_GenericVector<UT_UCSChar*>* SpellChecker::_suggestWord ( const UT_UCSChar word,
size_t  len 
) [private, pure virtual]

Implemented in EnchantChecker.

Referenced by suggestWord().

bool SpellChecker::addToCustomDict ( const UT_UCSChar word,
size_t  len 
) [virtual]
void SpellChecker::correctWord ( const UT_UCSChar toCorrect,
size_t  toCorrectLen,
const UT_UCSChar correct,
size_t  correctLen 
) [virtual]

Reimplemented in EnchantChecker.

Referenced by AP_Dialog_Spell::changeWordWith().

virtual bool SpellChecker::doesDictionaryExist ( const char *   )  [inline, virtual]
const UT_String& SpellChecker::getLanguage ( void   )  const [inline]

Referenced by checkWord().

virtual UT_Vector& SpellChecker::getMapping (  )  [inline, virtual]
virtual void SpellChecker::ignoreWord ( const UT_UCSChar toCorrect,
size_t  toCorrectLen 
) [pure virtual]

Implemented in EnchantChecker.

Referenced by AP_Dialog_Spell::addIgnoreAll().

bool SpellChecker::isDictionaryFound ( void   )  [inline]
virtual bool SpellChecker::isIgnored ( const UT_UCSChar pWord,
size_t  len 
) const [pure virtual]

Implemented in EnchantChecker.

void SpellChecker::operator= ( const SpellChecker  )  [private]
bool SpellChecker::requestDictionary ( const char *  szLang  ) 
void SpellChecker::setDictionaryFound ( bool  b  )  [inline]
void SpellChecker::setLanguage ( const char *  lang  )  [inline, protected]
UT_GenericVector< UT_UCSChar * > * SpellChecker::suggestWord ( const UT_UCSChar word,
size_t  len 

Friends And Related Function Documentation

friend class SpellManager [friend]

Reimplemented in EnchantChecker.

Member Data Documentation

bool SpellChecker::m_bIsBarbarism [protected]

Referenced by checkWord().

Referenced by checkWord().

The documentation for this class was generated from the following files: