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.

114 lines
2.7 KiB

  1. /******************************************************************************
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. WMIParser_Property_Array.cpp
  5. Abstract:
  6. This file contains the implementation of the WMIParser::Property_Array 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 L"VALUE.ARRAY/VALUE"
  14. WMIParser::Property_Array::Property_Array()
  15. {
  16. __HCP_FUNC_ENTRY( "WMIParser::Property_Array::Property_Array" );
  17. // ElemList m_lstElements;
  18. }
  19. WMIParser::Property_Array::~Property_Array()
  20. {
  21. __HCP_FUNC_ENTRY( "WMIParser::Property_Array::~Property_Array" );
  22. }
  23. ////////////////////////////////////////////////
  24. bool WMIParser::Property_Array::operator==( /*[in]*/ Property_Array const &wmippa ) const
  25. {
  26. __HCP_FUNC_ENTRY( "WMIParser::Property_Array::operator==" );
  27. bool fRes = (*(static_cast<Property const *>(this)) == wmippa.m_szName);
  28. if(fRes)
  29. {
  30. fRes = (m_lstElements == wmippa.m_lstElements);
  31. }
  32. __HCP_FUNC_EXIT(fRes);
  33. }
  34. ////////////////////////////////////////////////
  35. HRESULT WMIParser::Property_Array::put_Node( /*[in]*/ IXMLDOMNode* pxdnNode )
  36. {
  37. __HCP_FUNC_ENTRY( "WMIParser::Property_Array::put_Node" );
  38. HRESULT hr;
  39. CComPtr<IXMLDOMNodeList> xdnlList;
  40. CComPtr<IXMLDOMNode> xdnNode;
  41. __MPC_EXIT_IF_METHOD_FAILS(hr, (static_cast<Property*>(this))->put_Node( pxdnNode ));
  42. //
  43. // Get all the elements of type "VALUE".
  44. //
  45. __MPC_EXIT_IF_METHOD_FAILS(hr, m_xmlNode.GetNodes( TAG_VALUE, &xdnlList ));
  46. for(;SUCCEEDED(hr = xdnlList->nextNode( &xdnNode )) && xdnNode != NULL; xdnNode = NULL)
  47. {
  48. ElemIter wmipvNew = m_lstElements.insert( m_lstElements.end() );
  49. __MPC_EXIT_IF_METHOD_FAILS(hr, wmipvNew->Parse( xdnNode, NULL ));
  50. }
  51. hr = S_OK;
  52. __HCP_FUNC_CLEANUP;
  53. __HCP_FUNC_EXIT(hr);
  54. }
  55. ////////////////////////////////////////////////
  56. HRESULT WMIParser::Property_Array::get_Data( /*[in]*/ int iIndex ,
  57. /*[out]*/ MPC::wstring& szData )
  58. {
  59. __HCP_FUNC_ENTRY( "WMIParser::Property_Array::get_Data" );
  60. HRESULT hr;
  61. hr = E_NOTIMPL;
  62. __HCP_FUNC_EXIT(hr);
  63. }
  64. HRESULT WMIParser::Property_Array::put_Data( /*[in]*/ int iIndex ,
  65. /*[in]*/ const MPC::wstring& szData ,
  66. /*[out]*/ bool& fFound )
  67. {
  68. __HCP_FUNC_ENTRY( "WMIParser::Property_Array::put_Data" );
  69. HRESULT hr;
  70. hr = E_NOTIMPL;
  71. __HCP_FUNC_EXIT(hr);
  72. }