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.

81 lines
2.1 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. PROJECT.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef __HMM_PROJECTOR__H_
  9. #define __HMM_PROJECTOR__H_
  10. #include "unk.h"
  11. #include "providl.h"
  12. #include "hmmstr.h"
  13. #include <arena.h>
  14. #include <dbgalloc.h>
  15. #include <flexarry.h>
  16. class CPropertyList : public CUnk
  17. {
  18. protected:
  19. class XPropertyList : public CImpl<IHmmPropertyList, CPropertyList>
  20. {
  21. public:
  22. XPropertyList(CPropertyList* pObj)
  23. : CImpl<IHmmPropertyList, CPropertyList>(pObj)
  24. {}
  25. STDMETHOD(GetList)(IN long lFlags, OUT long* plNumProps,
  26. OUT HMM_WSTR **pawszProperties);
  27. STDMETHOD(IsSelected)(IN HMM_WSTR wszPropertyName);
  28. } m_XList;
  29. friend XPropertyList;
  30. class XConfigure : public CImpl<IConfigureHmmProjector, CPropertyList>
  31. {
  32. public:
  33. XConfigure(CPropertyList* pObj)
  34. : CImpl<IConfigureHmmProjector, CPropertyList>(pObj)
  35. {}
  36. STDMETHOD(RemoveAllProperties)();
  37. STDMETHOD(AddProperties)(IN long lNumProps,
  38. IN HMM_WSTR* awszProperties);
  39. } m_XConfigure;
  40. friend XConfigure;
  41. CWStringArray m_awsProperties;
  42. public:
  43. CPropertyList(CLifeControl* pControl, IUnknown* pOuter)
  44. : CUnk(pControl, pOuter), m_XList(this), m_XConfigure(this)
  45. {}
  46. ~CPropertyList(){}
  47. void* GetInterface(REFIID riid);
  48. public:
  49. inline HRESULT RemoveAllProperties()
  50. {return m_XConfigure.RemoveAllProperties();}
  51. inline HRESULT AddProperties(IN long lNumProps,
  52. IN HMM_WSTR* awszProperties)
  53. {return m_XConfigure.AddProperties(lNumProps, awszProperties);}
  54. inline HRESULT GetList(IN long lFlags, OUT long* plNumProps,
  55. OUT HMM_WSTR **pawszProperties)
  56. {return m_XList.GetList(lFlags, plNumProps, pawszProperties);}
  57. inline HRESULT IsSelected(IN HMM_WSTR wszProperty)
  58. {return m_XList.IsSelected(wszProperty);}
  59. inline HRESULT AddAllProperties()
  60. {
  61. RemoveAllProperties();
  62. HMM_WSTR wszNull = L"";
  63. AddProperties(1, &wszNull);
  64. return HMM_S_NO_ERROR;
  65. }
  66. };
  67. #endif