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.

71 lines
1.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __OBJECT_MSONWINDOW_LOGGINGSERVICE_H_INCL__
  2. #define __OBJECT_MSONWINDOW_LOGGINGSERVICE_H_INCL__
  3. #include "../base/basicFunctionality.h"
  4. #include "../base/basicLoggingService.h"
  5. #include <queue>
  6. #include <time.h>
  7. typedef std::vector<CSTR> vectorCSTR;
  8. CSTR wstr2str(wchar_t * wideStr);
  9. wchar_t * str2wstr(CSTR Str);
  10. /**
  11. * TODO: Add class description
  12. *
  13. * @author Gagua
  14. */
  15. class objectMsOnWindowLoggingService : public basicLoggingService
  16. {
  17. private:
  18. bool m_bLogging;
  19. vectorCSTR * m_pMessages;
  20. HWND m_hWND;
  21. size_t m_nLineNumber;
  22. // basicMutex * m_pMutex;
  23. public:
  24. explicit objectMsOnWindowLoggingService(size_t Lines, vectorCSTR * VCT, HWND wnd = NULL);
  25. ~objectMsOnWindowLoggingService();
  26. void logMessage(CSTR Msg);
  27. void logMessage(const char * Msg);
  28. // Copy constructor
  29. // TODO: Uncomment the copy constructor when you need it.
  30. // objectFileLoggingService(const objectFileLoggingService& src);
  31. // Assignment operator
  32. // TODO: Uncomment the assignment operator when you need it.
  33. // objectFileLoggingService& operator=(const objectFileLoggingService& src);
  34. void setWND(HWND ptr)
  35. {
  36. m_hWND = ptr;
  37. }
  38. wchar_t * getWString(int id);
  39. char * getString(int id);
  40. void paint(HDC hdc);
  41. };
  42. // TODO: Uncomment the copy constructor when you need it.
  43. // inline objectFileLoggingService::objectFileLoggingService(const objectFileLoggingService& src)
  44. //{
  45. // // TODO: copy
  46. //}
  47. // TODO: Uncomment the assignment operator when you need it.
  48. // inline objectFileLoggingService& objectFileLoggingService::operator=(const objectFileLoggingService& rhs)
  49. //{
  50. // if (this == &rhs) {
  51. // return *this;
  52. // }
  53. //
  54. // // TODO: assignment
  55. //
  56. // return *this;
  57. //}
  58. #endif // __OBJECTFILELOGGINGSERVICE_H_INCL__