Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

  1. #include "convbase.h"
  2. class CInccHzGbIn : public CINetCodeConverter
  3. {
  4. private:
  5. BOOL (CInccHzGbIn::*m_pfnConv)(UCHAR tc);
  6. BOOL (CInccHzGbIn::*m_pfnCleanUp)();
  7. BOOL m_fGBMode;
  8. UCHAR m_tcLeadByte;
  9. UINT m_nESCBytes; /* # bytes of ESC sequence */
  10. public:
  11. CInccHzGbIn();
  12. CInccHzGbIn(UINT uCodePage, int nCodeSet);
  13. ~CInccHzGbIn() {}
  14. virtual HRESULT ConvertChar(UCHAR tc, int cchSrc=-1);
  15. virtual BOOL CleanUp();
  16. virtual int GetUnconvertBytes();
  17. virtual DWORD GetConvertMode();
  18. virtual void SetConvertMode(DWORD mode);
  19. private:
  20. void Reset();
  21. BOOL ConvMain(UCHAR tc);
  22. BOOL CleanUpMain();
  23. BOOL ConvTilde(UCHAR tc);
  24. BOOL CleanUpTilde();
  25. BOOL ConvDoubleByte(UCHAR tc);
  26. BOOL CleanUpDoubleByte();
  27. };
  28. class CInccHzGbOut : public CINetCodeConverter
  29. {
  30. private:
  31. BOOL m_fDoubleByte;
  32. UCHAR m_tcLeadByte;
  33. BOOL m_fGBMode;
  34. DWORD _dwFlag;
  35. WCHAR *_lpFallBack;
  36. public:
  37. CInccHzGbOut(UINT uCodePage, int nCodeSet, DWORD dwFlag, WCHAR *lpFallBack);
  38. ~CInccHzGbOut() {}
  39. virtual HRESULT ConvertChar(UCHAR tc, int cchSrc=-1);
  40. virtual BOOL CleanUp();
  41. virtual int GetUnconvertBytes();
  42. virtual DWORD GetConvertMode();
  43. virtual void SetConvertMode(DWORD mode);
  44. private:
  45. void Reset();
  46. };