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.

66 lines
1.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // Condition.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file declares the class Condition.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/04/1998 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _CONDITION_H_
  19. #define _CONDITION_H_
  20. #include <nap.h>
  21. #include <nocopy.h>
  22. ///////////////////////////////////////////////////////////////////////////////
  23. //
  24. // CLASS
  25. //
  26. // Condition
  27. //
  28. // DESCRIPTION
  29. //
  30. // This serves as an abstract base class for all condition objects.
  31. //
  32. ///////////////////////////////////////////////////////////////////////////////
  33. class ATL_NO_VTABLE Condition :
  34. public CComObjectRootEx<CComMultiThreadModelNoCS>,
  35. public ICondition,
  36. public IConditionText,
  37. private NonCopyable
  38. {
  39. public:
  40. BEGIN_COM_MAP(Condition)
  41. COM_INTERFACE_ENTRY(ICondition)
  42. COM_INTERFACE_ENTRY(IConditionText)
  43. END_COM_MAP()
  44. Condition() throw ()
  45. : conditionText(NULL)
  46. { }
  47. ~Condition() throw ()
  48. { SysFreeString(conditionText); }
  49. //////////
  50. // IConditionText
  51. //////////
  52. STDMETHOD(get_ConditionText)(/*[out, retval]*/ BSTR *pVal);
  53. STDMETHOD(put_ConditionText)(/*[in]*/ BSTR newVal);
  54. protected:
  55. BSTR conditionText;
  56. };
  57. #endif //_CONDITION_H_