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.

101 lines
2.5 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. LL_ALL = 0,
  28. LL_DEBUG = 1,
  29. LL_VERBOSE = 2,
  30. LL_INFO = 3,
  31. LL_ERROR = 128,
  32. LL_SILENT = 255
  33. } LOG_LEVEL;
  34. #pragma pack()
  35. class basicLogEngine {
  36. public:
  37. // Method to fetch singleton instance.
  38. static basicLogEngine* getInstance();
  39. // Destructor
  40. virtual ~basicLogEngine();
  41. bool attach( basicEvtDispatcher *EvtDsp );
  42. void logEvt( basicEvent *Evt );
  43. protected:
  44. // Constructor - protected so users cannot call it.
  45. basicLogEngine();
  46. private:
  47. // private static member referencing the single instance of the object
  48. // TODO: Replace basicLogEngine with the type of object you want to
  49. // return the single instance of
  50. static basicLogEngine* _instance;
  51. //static pEventQueue m_vpEventQueue;
  52. pDispatcherQueue m_vpDispatcherQueue;
  53. // Copy constructor
  54. // Declared but not defined to prevent auto-generated
  55. // copy constructor. Refer to "Effective C++" by Meyers
  56. basicLogEngine(const basicLogEngine& src);
  57. // Assignment operator
  58. // Declared but not defined to prevent auto-generated
  59. // assignment operator. Refer to "Effective C++" by Meyers
  60. basicLogEngine& operator=(const basicLogEngine& src);
  61. };
  62. // Constructor implementation
  63. inline basicLogEngine::basicLogEngine()
  64. {
  65. }
  66. // Destructor implementation
  67. inline basicLogEngine::~basicLogEngine()
  68. {
  69. }
  70. // TODO: Uncomment the copy constructor when you need it.
  71. //inline basicLogEngine::basicLogEngine(const basicLogEngine& src)
  72. //{
  73. // // TODO: copy
  74. //}
  75. // TODO: Uncomment the assignment operator when you need it.
  76. //inline basicLogEngine& basicLogEngine::operator=(const basicLogEngine& rhs)
  77. //{
  78. // if (this == &rhs) {
  79. // return *this;
  80. // }
  81. //
  82. // // TODO: assignment
  83. //
  84. // return *this;
  85. //}
  86. #endif // __BASICLOGENGINE_H_INCL__