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.

111 lines
2.2 KiB

  1. //***************************************************************************
  2. //
  3. // Copyright (c) 1998-1999 Microsoft Corporation
  4. //
  5. // site.h
  6. //
  7. // alanbos 13-Feb-98 Created.
  8. //
  9. // Defines site information for an object
  10. //
  11. //***************************************************************************
  12. #ifndef _SITE_H_
  13. #define _SITE_H_
  14. class CSWbemObject;
  15. class CSWbemProperty;
  16. //***************************************************************************
  17. //
  18. // CLASS NAME:
  19. //
  20. // CWbemSite
  21. //
  22. // DESCRIPTION:
  23. //
  24. // Abstract base class
  25. //
  26. //***************************************************************************
  27. class CWbemSite
  28. {
  29. protected:
  30. CWbemSite () { m_cRef = 1; }
  31. long m_cRef;
  32. public:
  33. virtual ~CWbemSite (void) { }
  34. virtual void Update () = 0;
  35. ULONG AddRef ();
  36. ULONG Release ();
  37. };
  38. //***************************************************************************
  39. //
  40. // CLASS NAME:
  41. //
  42. // CWbemObjectSite
  43. //
  44. // DESCRIPTION:
  45. //
  46. // Site class for ISWbemObject
  47. //
  48. //***************************************************************************
  49. class CWbemObjectSite : public CWbemSite
  50. {
  51. private:
  52. ISWbemInternalObject *m_pSWbemObject;
  53. public:
  54. CWbemObjectSite (ISWbemInternalObject *pObject);
  55. ~CWbemObjectSite ();
  56. // Overriden methods of base class
  57. void Update ();
  58. };
  59. //***************************************************************************
  60. //
  61. // CLASS NAME:
  62. //
  63. // CWbemPropertySite
  64. //
  65. // DESCRIPTION:
  66. //
  67. // Site class for ISWbemProperty, where the property is non-array valued.
  68. // Embedded objects that are not in an array use this as their site.
  69. //
  70. //***************************************************************************
  71. class CWbemPropertySite : public CWbemSite
  72. {
  73. private:
  74. // The property representing the embedded object
  75. CSWbemProperty *m_pSWbemProperty;
  76. // The array index of the property value at which
  77. // this embedded object occurs (or -1 if not array)
  78. long m_index;
  79. // The embedded object itself
  80. IWbemClassObject *m_pIWbemClassObject;
  81. public:
  82. CWbemPropertySite (CSWbemProperty *pProperty,
  83. IWbemClassObject *pSourceObject,
  84. long index = -1);
  85. ~CWbemPropertySite ();
  86. // Overriden methods of base class
  87. void Update ();
  88. };
  89. #endif