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.

137 lines
3.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltatom.hxx
  7. BLT atom manipulation classes: definition
  8. FILE HISTORY:
  9. beng 15-May-1991 Split from bltmisc.hxx
  10. */
  11. #ifndef _BLT_HXX_
  12. #error "Don't include this file directly; instead, include it through blt.hxx"
  13. #endif // _BLT_HXX_
  14. #ifndef _BLTATOM_HXX_
  15. #define _BLTATOM_HXX_
  16. #include "base.hxx"
  17. DLL_CLASS NLS_STR;
  18. /**********************************************************************
  19. NAME: ATOM_BASE
  20. SYNOPSIS: atom base
  21. INTERFACE:
  22. QueryHandle() - handle for the atom
  23. operator=() - assign atom
  24. QueryString() - query atom
  25. PARENT: BASE
  26. HISTORY:
  27. RustanL 21-Nov-1990 Created
  28. beng 04-Oct-1991 Win32 conversion
  29. **********************************************************************/
  30. DLL_CLASS ATOM_BASE : public BASE
  31. {
  32. private:
  33. ATOM _hAtom;
  34. virtual ATOM W_AddAtom( const TCHAR * pch ) const = 0;
  35. virtual APIERR W_QueryString( TCHAR * pchBuffer, UINT chBuf ) const = 0;
  36. protected:
  37. ATOM_BASE();
  38. ATOM_BASE( ATOM hAtom );
  39. ~ATOM_BASE();
  40. const TCHAR * AssignAux( const TCHAR * pch );
  41. public:
  42. ATOM QueryHandle() const { return _hAtom; }
  43. virtual const TCHAR * operator=( const TCHAR * pch ) = 0;
  44. APIERR QueryString( TCHAR * pchBuffer, UINT cbBuf ) const;
  45. };
  46. /**********************************************************************
  47. NAME: GLOBAL_ATOM
  48. SYNOPSIS: global atom class
  49. INTERFACE:
  50. GLOBAL_ATOM() - constructor
  51. ~GLOBAL_ATOM() - destructor
  52. operator=() - assignment
  53. PARENT: ATOM_BASE
  54. HISTORY:
  55. RustanL 21-Nov-1990 Created
  56. beng 04-Oct-1991 Win32 conversion
  57. **********************************************************************/
  58. DLL_CLASS GLOBAL_ATOM : public ATOM_BASE
  59. {
  60. private:
  61. virtual ATOM W_AddAtom( const TCHAR * pch ) const;
  62. virtual APIERR W_QueryString( TCHAR * pchBuffer, UINT cbBuf ) const;
  63. public:
  64. GLOBAL_ATOM( const TCHAR * pch = NULL );
  65. ~GLOBAL_ATOM();
  66. const TCHAR * operator=( const TCHAR * pch );
  67. };
  68. /**********************************************************************
  69. NAME: LOCAL_ATOM
  70. SYNOPSIS: Local atom class
  71. INTERFACE:
  72. LOCAL_ATOM() - constructor
  73. ~LOCAL_ATOM() - destructor
  74. operator=() - assignment
  75. PARENT: ATOM_BASE
  76. HISTORY:
  77. RustanL 21-Nov-1990 Created
  78. beng 04-Oct-1991 Win32 conversion
  79. **********************************************************************/
  80. DLL_CLASS LOCAL_ATOM : public ATOM_BASE
  81. {
  82. private:
  83. virtual ATOM W_AddAtom( const TCHAR * pch ) const;
  84. virtual APIERR W_QueryString( TCHAR * pchBuffer, UINT cbBuf ) const;
  85. public:
  86. LOCAL_ATOM( const TCHAR * pch = NULL );
  87. ~LOCAL_ATOM();
  88. const TCHAR * operator=( const TCHAR * pch );
  89. };
  90. #endif // _BLTATOM_HXX_ - end of file