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.

85 lines
2.8 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: reporter.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. #ifndef ESPUTIL_REPORTER_H
  11. #define ESPUTIL_REPORTER_H
  12. //
  13. // Basic output mechanism for Espresso 2.x. Allows the caller to uniformly
  14. // report messages of various severities to the user without worrying about
  15. // the exact implementation or destination.
  16. //
  17. // We provide ways of outputting strings, or for loading messages from string
  18. // tables and outputting those.
  19. //
  20. // The confidence level allow the caller to tell the Reporter that messages
  21. // will actually provide meaningful information. This is used (in particular)
  22. // in the parsers when a file has not yet ever been parsed.
  23. //
  24. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  25. // as base for dll-interface class 'bar'
  26. class LTAPIENTRY CReporter : public CReport
  27. {
  28. public:
  29. CReporter() {};
  30. void AssertValid(void) const;
  31. virtual void IssueMessage(MessageSeverity, const CLString &strContext,
  32. const CLString &strMessage, CGoto *pGoto = NULL,
  33. CGotoHelp *pGotoHelp = NULL) = 0;
  34. //
  35. // The usage of these versions of IssueMessage is discouraged. Use the
  36. // versions with the CGoto objects instead.
  37. virtual void IssueMessage(MessageSeverity, const CLString &strContext,
  38. const CLString &strMessage, const CLocation &,
  39. UINT uiHelpContext = 0);
  40. virtual void IssueMessage(MessageSeverity,
  41. const CPascalString &strContext, const CLString &strMessage,
  42. const CLocation &, UINT uiHelpContext = 0);
  43. virtual void IssueMessage(MessageSeverity, const CLString &strContext,
  44. HMODULE hResourceModule, UINT uiStringId, const CLocation &,
  45. UINT uiHelpContext = 0);
  46. virtual void IssueMessage(MessageSeverity, HMODULE hResourceModule,
  47. UINT uiContext, const CLString &strMessage ,
  48. const CLocation &, UINT uiHelpContext = 0);
  49. virtual void IssueMessage(MessageSeverity, HMODULE hResourceModule,
  50. UINT uiContext, UINT uiStringId, const CLocation &,
  51. UINT uiHelpContext = 0);
  52. virtual void IssueMessage(MessageSeverity, const CContext &context,
  53. const CLString &strMessage, UINT uiHelpId = 0);
  54. virtual void IssueMessage(MessageSeverity, const CContext &context,
  55. HMODULE hResourceModule, UINT uiStringId, UINT uiHelpId = 0);
  56. virtual ~CReporter();
  57. private:
  58. //
  59. // Prevent usage of copy constructor or assignment operator.
  60. //
  61. CReporter(const CReporter &);
  62. const CReporter &operator=(const CReporter &);
  63. };
  64. #pragma warning(default: 4275)
  65. #endif // ESPUTIL_REPORTER_H