Leaked source code of windows server 2003
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.

104 lines
2.4 KiB

  1. //=================================================================
  2. //
  3. // binding.h -- Generic association class
  4. //
  5. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  6. //
  7. //=================================================================
  8. #pragma once
  9. #include "assoc.h"
  10. #define MAX_ORS 3
  11. class CBinding : public CAssociation
  12. {
  13. public:
  14. CBinding(
  15. LPCWSTR pwszClassName,
  16. LPCWSTR pwszNamespaceName,
  17. LPCWSTR pwszLeftClassName,
  18. LPCWSTR pwszRightClassName,
  19. LPCWSTR pwszLeftPropertyName,
  20. LPCWSTR pwszRightPropertyName,
  21. LPCWSTR pwszLeftBindingPropertyName,
  22. LPCWSTR pwszRightBindingPropertyName
  23. );
  24. virtual ~CBinding();
  25. protected:
  26. virtual bool AreRelated(
  27. const CInstance *pLeft,
  28. const CInstance *pRight
  29. );
  30. virtual void MakeWhere(
  31. CHStringArray &sRightPaths,
  32. CHStringArray &sRightWheres
  33. );
  34. virtual HRESULT FindWhere(
  35. TRefPointerCollection<CInstance> &lefts,
  36. CHStringArray &sLeftWheres
  37. );
  38. virtual HRESULT GetLeftInstances(
  39. MethodContext *pMethodContext,
  40. TRefPointerCollection<CInstance> &lefts,
  41. const CHStringArray &sRightValues
  42. );
  43. virtual HRESULT GetRightInstances(
  44. MethodContext *pMethodContext,
  45. TRefPointerCollection<CInstance> *lefts,
  46. const CHStringArray &sLeftWheres
  47. );
  48. virtual HRESULT RetrieveLeftInstance(
  49. LPCWSTR lpwszObjPath,
  50. CInstance **ppInstance,
  51. MethodContext *pMethodContext
  52. );
  53. virtual HRESULT RetrieveRightInstance(
  54. LPCWSTR lpwszObjPath,
  55. CInstance **ppInstance,
  56. MethodContext *pMethodContext
  57. );
  58. bool CompareVariantsNoCase(const VARIANT *v1, const VARIANT *v2);
  59. HRESULT MakeString(VARIANT *pvValue, CHString &sTemp);
  60. DWORD IsInList(
  61. const CHStringArray &csaArray,
  62. LPCWSTR pwszValue
  63. );
  64. void EscapeCharacters(LPCWSTR wszIn,
  65. CHString& chstrOut);
  66. //-----------
  67. CHString m_sLeftBindingPropertyName;
  68. CHString m_sRightBindingPropertyName;
  69. };