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.

104 lines
2.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Dr.Frucht Systems Ltd.
  3. // Copyright � 2000-2016. All Rights Reserved.
  4. // Version 2.0 3/30/2016
  5. // Last modification: 3/30/2016
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: basicLogEngine.h
  9. // AUTHOR: gagua
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of basicLogEngine.h
  13. //----------------------------------------------------------------------------
  14. //
  15. #ifndef __BASICLOGENGINE_H_INCL__
  16. #define __BASICLOGENGINE_H_INCL__
  17. #include "basicEvtDispatcher.h"
  18. /**
  19. * TODO: Add class description
  20. *
  21. * @author gagua
  22. */
  23. typedef std::vector<basicEvtDispatcher> DispatcherQueue;
  24. typedef std::vector<basicEvtDispatcher *> pDispatcherQueue;
  25. #pragma pack(1)
  26. typedef enum LOG_LEVEL
  27. {
  28. LL_ALL = 0,
  29. LL_DEBUG = 1,
  30. LL_VERBOSE = 2,
  31. LL_INFO = 3,
  32. LL_ERROR = 128,
  33. LL_SILENT = 255
  34. } LOG_LEVEL;
  35. #pragma pack()
  36. class basicLogEngine
  37. {
  38. public:
  39. // Method to fetch singleton instance.
  40. static basicLogEngine * getInstance();
  41. // Destructor
  42. virtual ~basicLogEngine();
  43. bool attach(basicEvtDispatcher * EvtDsp);
  44. void logEvt(basicEvent * Evt);
  45. protected:
  46. // Constructor - protected so users cannot call it.
  47. basicLogEngine();
  48. private:
  49. // private static member referencing the single instance of the object
  50. // TODO: Replace basicLogEngine with the type of object you want to
  51. // return the single instance of
  52. static basicLogEngine * _instance;
  53. // static pEventQueue m_vpEventQueue;
  54. pDispatcherQueue m_vpDispatcherQueue;
  55. // Copy constructor
  56. // Declared but not defined to prevent auto-generated
  57. // copy constructor. Refer to "Effective C++" by Meyers
  58. basicLogEngine(const basicLogEngine & src);
  59. // Assignment operator
  60. // Declared but not defined to prevent auto-generated
  61. // assignment operator. Refer to "Effective C++" by Meyers
  62. basicLogEngine & operator=(const basicLogEngine & src);
  63. };
  64. // Constructor implementation
  65. inline basicLogEngine::basicLogEngine() {}
  66. // Destructor implementation
  67. inline basicLogEngine::~basicLogEngine() {}
  68. // TODO: Uncomment the copy constructor when you need it.
  69. // inline basicLogEngine::basicLogEngine(const basicLogEngine& src)
  70. //{
  71. // // TODO: copy
  72. //}
  73. // TODO: Uncomment the assignment operator when you need it.
  74. // inline basicLogEngine& basicLogEngine::operator=(const basicLogEngine& rhs)
  75. //{
  76. // if (this == &rhs) {
  77. // return *this;
  78. // }
  79. //
  80. // // TODO: assignment
  81. //
  82. // return *this;
  83. //}
  84. #endif // __BASICLOGENGINE_H_INCL__