DictComp.h
上传用户:biuytresa
上传日期:2007-12-07
资源大小:721k
文件大小:1k
源码类别:

DNA

开发平台:

Visual C++

  1. #ifndef __DictComp_H__
  2. #define __DictComp_H__
  3. #ifndef __IDictionary_H__
  4. #include "IDictionary.h"
  5. #endif
  6. #ifndef __ISpellCheck_H__
  7. #include "ISpellCheck.h"
  8. #endif
  9. #define MaxWordLength 32
  10. struct DictWord
  11. {
  12. char wordForLang1[MaxWordLength];
  13. char wordForLang2[MaxWordLength];
  14. };
  15. class CDictionary : public IDictionary ,  public ISpellCheck
  16. {
  17. public :
  18. CDictionary();
  19. ~CDictionary();
  20. public :
  21. // IUnknown member function
  22. virtual HRESULT __stdcall QueryInterface(const IID& iid, void **ppv) ;
  23. virtual ULONG __stdcall AddRef() ; 
  24. virtual ULONG __stdcall Release() ;
  25. // IDictionary member function
  26. virtual BOOL __stdcall Initialize();
  27. virtual BOOL __stdcall LoadLibrary(String);
  28. virtual BOOL __stdcall InsertWord(String, String);
  29. virtual void __stdcall DeleteWord(String);
  30. virtual BOOL __stdcall LookupWord(String, String *);
  31. virtual BOOL __stdcall RestoreLibrary(String);
  32. virtual void __stdcall FreeLibrary();
  33. // ISpellCheck member function
  34. virtual BOOL __stdcall CheckWord (String word, String *);
  35. private :
  36. struct DictWord *m_Data;
  37. char *m_DictFilename[128];
  38. int m_Ref ;
  39. int m_nWordNumber, m_nStructNumber;
  40. };
  41. #endif // __DictComp_H__