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.

69 lines
2.3 KiB

  1. //
  2. // MODULE: ApgtsCounters.h
  3. //
  4. // PURPOSE: interface and implementation for the CApgtsCounters class
  5. //
  6. // PROJECT: Generic Troubleshooter DLL for Microsoft AnswerPoint
  7. //
  8. // COMPANY: Saltmine Creative, Inc. (206)-284-7511 [email protected]
  9. //
  10. // AUTHOR: Joe Mabel
  11. //
  12. // ORIGINAL DATE: 10-01-1998
  13. //
  14. // NOTES:
  15. //
  16. // Version Date By Comments
  17. //--------------------------------------------------------------------
  18. // V3.0 10-01-98 JM Original
  19. //
  20. //////////////////////////////////////////////////////////////////////
  21. #if !defined(AFX_APGTSCOUNTERS_H__E3FD52E9_5944_11D2_9603_00C04FC22ADD__INCLUDED_)
  22. #define AFX_APGTSCOUNTERS_H__E3FD52E9_5944_11D2_9603_00C04FC22ADD__INCLUDED_
  23. #if _MSC_VER >= 1000
  24. #pragma once
  25. #endif // _MSC_VER >= 1000
  26. #include "counter.h"
  27. // There should be exactly one (global) instance of this class.
  28. // Any other class C that needs access to these counters should get a pointer to
  29. // the relevant counter(s) in its own constructor and thereafter access the counter
  30. // through the member.
  31. // If class C only needs to increment the counter, it's pointer to the CHourlyDailyCounter
  32. // should be of type CAbstractCounter.
  33. // A single .cpp file should define APGTS_COUNTER_OWNER before including the present file.
  34. class CApgtsCounters
  35. {
  36. public:
  37. CHourlyDailyCounter m_ProgramContemporary; // really just used to track when program started.
  38. CHourlyDailyCounter m_StatusAccesses;
  39. CHourlyDailyCounter m_OperatorActions;
  40. CHourlyDailyCounter m_AllAccessesStart;
  41. CHourlyDailyCounter m_AllAccessesFinish;
  42. CHourlyDailyCounter m_QueueFullRejections;
  43. CHourlyDailyCounter m_UnknownTopics;
  44. CHourlyDailyCounter m_LoggedErrors;
  45. CApgtsCounters()
  46. : m_ProgramContemporary(CCounterLocation::eIdProgramContemporary),
  47. m_StatusAccesses(CCounterLocation::eIdStatusAccess),
  48. m_OperatorActions(CCounterLocation::eIdActionAccess),
  49. m_AllAccessesStart(CCounterLocation::eIdTotalAccessStart),
  50. m_AllAccessesFinish(CCounterLocation::eIdTotalAccessFinish),
  51. m_QueueFullRejections(CCounterLocation::eIdRequestRejected),
  52. m_UnknownTopics(CCounterLocation::eIdRequestUnknown),
  53. m_LoggedErrors(CCounterLocation::eIdErrorLogged)
  54. {}
  55. ~CApgtsCounters() {}
  56. };
  57. #ifdef APGTS_COUNTER_OWNER
  58. CApgtsCounters g_ApgtsCounters;
  59. #else
  60. extern CApgtsCounters g_ApgtsCounters;
  61. #endif
  62. #endif // !defined(AFX_APGTSCOUNTERS_H__E3FD52E9_5944_11D2_9603_00C04FC22ADD__INCLUDED_)