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.

62 lines
1.8 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __OBJECT_MSONWINDOW_LOGGINGSERVICE_H_INCL__
  2. #define __OBJECT_MSONWINDOW_LOGGINGSERVICE_H_INCL__
  3. #include <time.h>
  4. #include <queue>
  5. #include "../base/basicFunctionality.h"
  6. #include "../base/basicLoggingService.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. private:
  17. bool m_bLogging;
  18. vectorCSTR * m_pMessages;
  19. HWND m_hWND;
  20. size_t m_nLineNumber;
  21. //basicMutex * m_pMutex;
  22. public:
  23. explicit objectMsOnWindowLoggingService(size_t Lines, vectorCSTR *VCT, HWND wnd = NULL );
  24. ~objectMsOnWindowLoggingService();
  25. void logMessage( CSTR Msg );
  26. void logMessage( const char *Msg );
  27. // Copy constructor
  28. // TODO: Uncomment the copy constructor when you need it.
  29. //objectFileLoggingService(const objectFileLoggingService& src);
  30. // Assignment operator
  31. // TODO: Uncomment the assignment operator when you need it.
  32. //objectFileLoggingService& operator=(const objectFileLoggingService& src);
  33. void setWND(HWND ptr){ m_hWND = ptr; };
  34. wchar_t * getWString(int id);
  35. char * getString(int id);
  36. void paint(HDC hdc);
  37. };
  38. // TODO: Uncomment the copy constructor when you need it.
  39. //inline objectFileLoggingService::objectFileLoggingService(const objectFileLoggingService& src)
  40. //{
  41. // // TODO: copy
  42. //}
  43. // TODO: Uncomment the assignment operator when you need it.
  44. //inline objectFileLoggingService& objectFileLoggingService::operator=(const objectFileLoggingService& rhs)
  45. //{
  46. // if (this == &rhs) {
  47. // return *this;
  48. // }
  49. //
  50. // // TODO: assignment
  51. //
  52. // return *this;
  53. //}
  54. #endif // __OBJECTFILELOGGINGSERVICE_H_INCL__