#include <glang.h>

Inheritance diagram for GLangFactory:
[legend]

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
 
GPlugInManagerGetMng (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 GPlugInNewPlugIn (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
 
GPlugInManagerGetMng (void)
 
GPlugInGetPlugIn (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
 
GPlugInManagerMng
 
GSessionSession
 
GPlugInPlugin
 
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
mngManager of the plug-in.
nameName of the language (the code).
descDescription of the plug-in (the name of the language).
libLibrary of the Factory/Plug-in.

Member Function Documentation

virtual void CreateStopWords ( R::RContainer< R::RString, true, false > &  stop,
R::RString code,
R::RString name 
)
pure virtual

Fill a container with all the stop words associated with the language.

Parameters
stopContainer.
codeCode of the language (must be filled by the function.
nameName of the language (must be filled by the function.