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.

77 lines
1.1 KiB

  1. // Copyright (c) Microsoft. All rights reserved.
  2. //
  3. // This is unpublished source code of Microsoft.
  4. // The copyright notice above does not evidence any
  5. // actual or intended publication of such source code.
  6. // OneLiner : Implementation of MWmiParameter
  7. // DevUnit : wlbstest
  8. // Author : Murtaza Hakim
  9. // include files
  10. #include "MWmiParameter.h"
  11. // constructor
  12. //
  13. MWmiParameter::MWmiParameter( const _bstr_t& name )
  14. : _name( name )
  15. {}
  16. // destructor
  17. //
  18. MWmiParameter::~MWmiParameter()
  19. {
  20. _value.Clear();
  21. }
  22. // copy constructor
  23. //
  24. MWmiParameter::MWmiParameter( const MWmiParameter& obj )
  25. : _name( obj._name ),
  26. _value( obj._value )
  27. {
  28. }
  29. // assignment operator
  30. //
  31. MWmiParameter&
  32. MWmiParameter::operator=( const MWmiParameter& rhs )
  33. {
  34. _name = rhs._name;
  35. _value.Clear();
  36. _value = rhs._value;
  37. return (*this);
  38. }
  39. // setValue
  40. //
  41. void
  42. MWmiParameter::setValue( const _variant_t& value )
  43. {
  44. _value.Clear();
  45. _value = value;
  46. }
  47. // getValue
  48. //
  49. _variant_t
  50. MWmiParameter::getValue()
  51. {
  52. return _value;
  53. }
  54. // getName
  55. //
  56. _bstr_t
  57. MWmiParameter::getName()
  58. {
  59. return _name;
  60. }