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.

115 lines
2.4 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. clsdict.hxx
  5. Abstract:
  6. definitions for class that stores the index of the class association entries
  7. based on class id.
  8. Notes:
  9. History:
  10. VibhasC Sep-29-1996 Created.
  11. ----------------------------------------------------------------------------*/
  12. #ifndef __CLSDICT_HXX__
  13. #define __CLSDICT_HXX__
  14. /****************************************************************************
  15. * include files
  16. ***************************************************************************/
  17. extern "C"
  18. {
  19. #define INC_OLE2
  20. #include <windows.h>
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <memory.h>
  24. #include <assert.h>
  25. }
  26. #include "dict.hxx"
  27. #include "message.hxx"
  28. /****************************************************************************
  29. * externs
  30. ***************************************************************************/
  31. extern int CompareClassIDKey( void *, void *);
  32. extern void PrintClassIDKey( void * );
  33. class CLSDICT : public Dictionary
  34. {
  35. public:
  36. //
  37. // The dictionary constructor must be supplied with the
  38. // comparison and print routines.
  39. //
  40. CLSDICT() : Dictionary( )
  41. {
  42. }
  43. //
  44. // The resource dictionary must delete all the resources it allocated.
  45. //
  46. ~CLSDICT()
  47. {
  48. Clear();
  49. }
  50. //
  51. // Insert a class association entry into the dictionary based on classid.
  52. // The entry is assumed preallocated and is not allocated by this
  53. // dictionary.
  54. //
  55. CLASS_ENTRY * Insert( CLASS_ENTRY * pClassEntry);
  56. //
  57. // Given a Class ID, search for a resource of a particular name in
  58. // the dictionary.
  59. //
  60. CLASS_ENTRY * Search( char * Clsid );
  61. //
  62. // Get the first item in the dictionary.
  63. //
  64. CLASS_ENTRY * GetFirst();
  65. //
  66. // Get the next item in the dictionary. This method takes the last found
  67. // class entry as a parameter and returns the next in the dictionary.
  68. // In conjunction with the GetFirst function, this function is useful for
  69. // listing all the items in the dictionary.
  70. // .
  71. //
  72. CLASS_ENTRY * GetNext( CLASS_ENTRY * pLastClassEntry );
  73. //
  74. // Clear up the dictionary by deleting all the resources allocated.
  75. //
  76. void Clear();
  77. //
  78. // Comparison function...
  79. //
  80. virtual
  81. int Compare (pUserType pL, pUserType pR);
  82. };
  83. #endif // __CLSDICT_HXX__