ChLibarry.h
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:2k
- // loadmylib.h: interface for the loadmylib class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_LOADMYLIB_H__4773B0BC_EABE_4EB8_B133_4E9EED2F62A5__INCLUDED_)
- #define AFX_LOADMYLIB_H__4773B0BC_EABE_4EB8_B133_4E9EED2F62A5__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class ChLibarry
- {
- public:
- //字库长度CLIB与字串个数LPCL由它们的下标限制
- char LibName[1000];
- HANDLE hMapFile;
- LPVOID lpMapFileBase;
- char *LIBHead;
- long *Headlon ;
- long *IndexNum ;
- long *NullIndex;
- long *CLIB_Start;
- long *CLIB_lon;
- long *ExCodeStart;
- long *ExCdlon;
- long *FileLong;
- long *LIBIndex;
- char *CLIB_EnCh;
- char *ExCdLIB;
- int Base, GoldeNum, GoldeLen; //编码规则部分使用
- char Midtems[5000] ; //存放中间临时字符串.
- long FirstChiNum; //从编码中得到的第一个汉字的位置
- unsigned long Sqrt(long num ,int p);
- public:
- long GetIndex(char *En);
- long GetIndex(char *En,char *chi);
- long GetChss(long ID,char *ss1,char *ss2,char *EE);
- long GetChss(char *enss,char *ss);
- char *EntoCh(char*Enss);
- long findNextChiAndID(char *Enss,char *Nextchiss);
- int loadChiLib(char *inputLibName,long Locbase, long LocGoldeNum, long LocGoldeLen);
- int loadChiLibEx(char *inputLibName,long Locbase, long LocGoldeNum, long LocGoldeLen);
- ChLibarry();
- virtual ~ChLibarry();
- long findNextID(char *Enss);
- long GetChlen(long ID);
- long deletestr(char *pc,char *Chi,int tag);
- long insertID(char *En,char *chi,int tag);
- deleteID(char *En,char *Chi,int tag);//删除指定的汉字串
- ScanID();
- bool isWBcode(char *inputEn);
- long DeleteSpace(long LID);
- long GetSpaceLon(long LID,char **pcBs,char **pcEx);
- long insertNewtoEnd(char *En,char *pcBs,char *pcEx);
- MySort(long CurID,int n, char *sle);
- long reloadmylib();
- Unloadmylib();
- long insertNewIndex(char *En,long nexindexvar);
- long FindSameWord(char* ss,char *chi,int tag);
- };
- #endif // !defined(AFX_LOADMYLIB_H__4773B0BC_EABE_4EB8_B133_4E9EED2F62A5__INCLUDED_)