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.

78 lines
1.9 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: report.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // Mechanism for reporting messages and such to people.
  8. //
  9. //-----------------------------------------------------------------------------
  10. enum MessageSeverity
  11. {
  12. esNote,
  13. esWarning,
  14. esError,
  15. esAbort
  16. };
  17. //
  18. // Basic output mechanism for Espresso 2.x. Allows the caller to uniformly
  19. // report messages of various severities to the user without worrying about
  20. // the exact implementation or destination.
  21. //
  22. // We provide ways of outputting strings, or for loading messages from string
  23. // tables and outputting those.
  24. //
  25. // The confidence level allow the caller to tell the Reporter that messages
  26. // will actually provide meaningful information. This is used (in particular)
  27. // in the parsers when a file has not yet ever been parsed.
  28. //
  29. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  30. // as base for dll-interface class 'bar'
  31. class LTAPIENTRY CReport // : virtual public CObject
  32. {
  33. public:
  34. CReport();
  35. virtual void AssertValid(void) const;
  36. virtual void Activate(void);
  37. virtual void Clear(void);
  38. enum ConfidenceLevel
  39. {
  40. Low,
  41. High
  42. };
  43. virtual void SetConfidenceLevel(ConfidenceLevel);
  44. virtual void IssueMessage(MessageSeverity, const CLString &strContext,
  45. const CLString &strMessage, CGoto *pGoto = NULL,
  46. CGotoHelp *pGotoHelp = NULL) = 0;
  47. NOTHROW static const CLString & GetErrorCodeText(MessageSeverity ms);
  48. virtual ~CReport();
  49. private:
  50. //
  51. // Prevent usage of copy constructor or assignment operator.
  52. //
  53. CReport(const CReport &);
  54. const CReport &operator=(const CReport &);
  55. //
  56. // Text for MessageSeverities.
  57. //
  58. static CLString strSeverities[4];
  59. friend void GlobalInitStrings(void);
  60. };
  61. #pragma warning(default: 4275)