#include <glang.h>
Inheritance diagram for GLangFactory:
Public Member Functions | |
GLangFactory (GPlugInManager *mng, const R::RString &name, const R::RString &desc, const R::RString &lib) | |
virtual void | CreateStopWords (R::RContainer< R::RString, true, false > &stop, R::RString &code, R::RString &name)=0 |
Public Member Functions inherited from GPlugInFactory | |
GPlugInFactory (GPlugInManager *mng, const R::RString &name, const R::RString &desc, const R::RString &lib, const R::RString &list) | |
int | GetLevel (void) const |
void | SetLevel (int level) |
R::RString | GetName (void) const |
R::RString | GetDesc (void) const |
R::RString | GetList (void) const |
GPlugInManager * | GetMng (void) const |
void | SetAbout (About_t dlg) |
void | SetConfig (void *dlg) |
void | SetHandler (void *handle) |
void | SetDlgHandler (void *handleDlg) |
int | Compare (const GPlugInFactory &f) const |
int | Compare (const R::RString &name) const |
int | Compare (const size_t level) const |
virtual GPlugIn * | NewPlugIn (GSession *session)=0 |
void | Create (GSession *session) |
void | Delete (void) |
void | About (void) |
void | Configure (void) |
void | InsertParam (R::RParam *param) |
void | ApplyConfig (void) |
bool | HasAbout (void) const |
bool | HasConfigure (void) const |
virtual const char * | GetAPIVersion (void) const =0 |
GPlugInManager * | GetMng (void) |
GPlugIn * | GetPlugIn (void) const |
template<class plugin > | |
plugin * | GetPlugIn (void) const |
bool | IsCreated (void) const |
R::RString | GetLib (void) const |
const char * | GetVersion (void) const |
virtual | ~GPlugInFactory (void) |
Additional Inherited Members | |
Public Types inherited from GPlugInFactory | |
typedef void(* | About_t )() |
typedef bool *(* | Configure_t )(GPlugIn *) |
Protected Attributes inherited from GPlugInFactory | |
R::RString | Name |
R::RString | Desc |
int | Level |
GPlugInManager * | Mng |
GSession * | Session |
GPlugIn * | Plugin |
R::RString | Lib |
About_t | AboutDlg |
void * | ConfigDlg |
void * | Handle |
void * | HandleDlg |
R::RString | List |
Detailed Description
The GLangFactory is a factory for a language plug-in. The main element is a specific method to get the stopwords, the name and the code of the language.
In practice, if the CREATE_LANG_FACTORY macro is used (which is the right thing to do), it is only necessary to create a static method GetStopWords in the created plugin. Here is an example:
void MyLanguage::GetStopWords(RContainer<RString,true,false>& stop)
{
stop.InsertPtr(new RString("a"));
stop.InsertPtr(new RString("able"));
stop.InsertPtr(new RString("about"));
}
Constructor & Destructor Documentation
GLangFactory | ( | GPlugInManager * | mng, |
const R::RString & | name, | ||
const R::RString & | desc, | ||
const R::RString & | lib | ||
) |
Constructor.
- Parameters
-
mng Manager of the plug-in. name Name of the language (the code). desc Description of the plug-in (the name of the language). lib Library of the Factory/Plug-in.
Member Function Documentation
|
pure virtual |
Fill a container with all the stop words associated with the language.
- Parameters
-
stop Container. code Code of the language (must be filled by the function. name Name of the language (must be filled by the function.