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.

118 lines
2.4 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. iidict.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 __IIDICT_HXX__
  13. #define __IIDICT_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. extern int CompareClassIDKey( void *, void *);
  34. extern void PrintClassIDKey( void * );
  35. class IIDICT : public Dictionary
  36. {
  37. public:
  38. //
  39. // The dictionary constructor must be supplied with the
  40. // comparison and print routines.
  41. //
  42. IIDICT() : Dictionary( )
  43. {
  44. }
  45. //
  46. // The resource dictionary must delete all the resources it allocated.
  47. //
  48. ~IIDICT()
  49. {
  50. Clear();
  51. }
  52. //
  53. // Insert an interface entry into the dictionary based on iid.
  54. // The entry is assumed preallocated and is not allocated by this
  55. // dictionary.
  56. //
  57. ITF_ENTRY * Insert( ITF_ENTRY * pInterfaceId);
  58. //
  59. // Given an interface ID, search for it in the dictionary.
  60. //
  61. ITF_ENTRY * Search( char * IID );
  62. //
  63. // Get the first item in the dictionary.
  64. //
  65. ITF_ENTRY * GetFirst();
  66. //
  67. // Get the next item in the dictionary. This method takes the last found
  68. // interface entry as a parameter and returns the next in the dictionary.
  69. // In conjunction with the GetFirst function, this function is useful for
  70. // listing all the items in the dictionary.
  71. // .
  72. //
  73. ITF_ENTRY * GetNext( ITF_ENTRY * pLastInterfaceEntry );
  74. //
  75. // Clear up the dictionary by deleting all the entries allocated.
  76. //
  77. void Clear();
  78. //
  79. // Comparison function...
  80. //
  81. virtual
  82. int Compare (pUserType pL, pUserType pR);
  83. };
  84. #endif // __IIDICT_HXX__