Subject: Re: Code for peer-review: SpellChecker class
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Wed Apr 11 2001 - 03:57:58 CDT
Looks great Dom, thanks for putting the time into this.
Just a few  questions / suggestions concerning 
virtual bool requestDictionary (const char * szLang): 
(1) should not the parameter be const XML_Char * ? 
(2) I would suggest that both for Ispell and Pspell, the szLang 
refers to the same tag of the format 'en-US', and that the translation 
to the ispell hash path is done within the ispell implementation of 
the SpelChecker class. This will make the integration into the 
existing code easier and the virtual class more virtual.
(3) I am not sure I understand what is happening in the function 
itself. I think we should first test whether m_map already contains 
our language and if so return the associated SpellChecker, and 
only if not try to allocate a new SpellChecker. I also suspect this 
function will have to look slightly different for Pspell and Ispell, for if 
I understand correctly, we will need only one instance of Pspell 
checker which handles multiple languages, while with Ispell we will 
need an instance for each language (which also means that the in 
the SpellManager destructor, we will have to delete these multiple 
instances as well).
Tomas 
This archive was generated by hypermail 2b25 : Wed Apr 11 2001 - 04:03:58 CDT