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.

98 lines
2.3 KiB

  1. /******************************************************************************
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. WMIParser_Property_Reference.cpp
  5. Abstract:
  6. This file contains the implementation of the WMIParser::Property_Reference class,
  7. which is used to hold the data of an property inside a CIM schema.
  8. Revision History:
  9. Davide Massarenti (Dmassare) 07/25/99
  10. created
  11. ******************************************************************************/
  12. #include "stdafx.h"
  13. #define TAG_VALUE_REFERENCE L"VALUE.REFERENCE"
  14. WMIParser::Property_Reference::Property_Reference()
  15. {
  16. __HCP_FUNC_ENTRY( "WMIParser::Property_Reference::Property_Reference" );
  17. // ValueReference m_wmipvrData;
  18. }
  19. WMIParser::Property_Reference::~Property_Reference()
  20. {
  21. __HCP_FUNC_ENTRY( "WMIParser::Property_Reference::~Property_Reference" );
  22. }
  23. ////////////////////////////////////////////////
  24. bool WMIParser::Property_Reference::operator==( /*[in]*/ Property_Reference const &wmipps ) const
  25. {
  26. __HCP_FUNC_ENTRY( "WMIParser::Property_Reference::operator==" );
  27. bool fRes;
  28. fRes = (*(static_cast<Property const *>(this)) == wmipps.m_szName);
  29. if(fRes)
  30. {
  31. fRes = (this->m_wmipvrData == wmipps.m_wmipvrData);
  32. }
  33. __HCP_FUNC_EXIT(fRes);
  34. }
  35. ////////////////////////////////////////////////
  36. HRESULT WMIParser::Property_Reference::put_Node( /*[in]*/ IXMLDOMNode* pxdnNode )
  37. {
  38. __HCP_FUNC_ENTRY( "WMIParser::Property_Reference::put_Node" );
  39. HRESULT hr;
  40. MPC::XmlUtil xmlNode( pxdnNode );
  41. CComPtr<IXMLDOMNode> xdnNode;
  42. __MPC_EXIT_IF_METHOD_FAILS(hr, (static_cast<Property*>(this))->put_Node( pxdnNode ));
  43. __MPC_EXIT_IF_METHOD_FAILS(hr, xmlNode.GetNode( TAG_VALUE_REFERENCE, &xdnNode ));
  44. if(xdnNode)
  45. {
  46. __MPC_EXIT_IF_METHOD_FAILS(hr, m_wmipvrData.Parse( xdnNode ));
  47. }
  48. hr = S_OK;
  49. __HCP_FUNC_CLEANUP;
  50. __HCP_FUNC_EXIT(hr);
  51. }
  52. ////////////////////////////////////////////////
  53. HRESULT WMIParser::Property_Reference::get_Data( /*[out]*/ ValueReference*& wmipvr )
  54. {
  55. __HCP_FUNC_ENTRY( "WMIParser::Property_Reference::get_Data" );
  56. HRESULT hr;
  57. wmipvr = &m_wmipvrData;
  58. hr = S_OK;
  59. __HCP_FUNC_EXIT(hr);
  60. }