2008-01-13 06:57:09 +01:00
|
|
|
#ifndef _DICTMGR_HXX_
|
|
|
|
#define _DICTMGR_HXX_
|
|
|
|
|
2012-10-08 21:20:19 +02:00
|
|
|
#include "hunvisapi.h"
|
|
|
|
|
2008-01-13 06:57:09 +01:00
|
|
|
#define MAXDICTIONARIES 100
|
|
|
|
#define MAXDICTENTRYLEN 1024
|
|
|
|
|
|
|
|
struct dictentry {
|
|
|
|
char * filename;
|
|
|
|
char * lang;
|
|
|
|
char * region;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-10-08 21:20:19 +02:00
|
|
|
class LIBHUNSPELL_DLL_EXPORTED DictMgr
|
2008-01-13 06:57:09 +01:00
|
|
|
{
|
2014-06-25 18:28:25 +02:00
|
|
|
private:
|
|
|
|
DictMgr(const DictMgr&);
|
|
|
|
DictMgr& operator = (const DictMgr&);
|
|
|
|
private:
|
2008-01-13 06:57:09 +01:00
|
|
|
int numdict;
|
|
|
|
dictentry * pdentry;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DictMgr(const char * dictpath, const char * etype);
|
|
|
|
~DictMgr();
|
|
|
|
int get_list(dictentry** ppentry);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int parse_file(const char * dictpath, const char * etype);
|
|
|
|
char * mystrsep(char ** stringp, const char delim);
|
|
|
|
char * mystrdup(const char * s);
|
|
|
|
void mychomp(char * s);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|