ImgUploadManager.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #include "identifydll_global.h"
  3. #include "basic_struct.h"
  4. #include <vector>
  5. #include <boost/smart_ptr.hpp>
  6. #include "ThreadPool.h"
  7. class CImgUploader;
  8. class SMARTEVALUATIONLOGIC_API CImgUploadManager
  9. {
  10. template<class T> friend class boost::shared_ptr;
  11. template<class T> friend inline void boost::checked_delete(T *);
  12. public:
  13. static boost::shared_ptr<CImgUploadManager> GetInstance();
  14. public:
  15. CImgUploadManager();
  16. ~CImgUploadManager();
  17. /************************************************************************/
  18. /* éè??ê??íí???é?′????¢·μ??′°?ú??±ú */
  19. /************************************************************************/
  20. int SetHandlerWndForImg(HWND hwnd);
  21. /************************************************************************/
  22. /* ?aê?ê??íí???é?′? */
  23. /************************************************************************/
  24. int StartUploadePaperImg();
  25. /************************************************************************/
  26. /* í£?1ê??íí???é?′? */
  27. /************************************************************************/
  28. int StopUploadePaperImg();
  29. /************************************************************************/
  30. /* 2é?ˉê??íí???é?′?è??? */
  31. /************************************************************************/
  32. int QueryUploadePaperImg(std::vector<IMG_UPLOAD_TASK>& tasks);
  33. /************************************************************************/
  34. /* 2é?ˉμ±?°ê??íí???é?′?è??? */
  35. /************************************************************************/
  36. int GetCurrentUploadTaskInfo(IMG_UPLOAD_TASK& task);
  37. /************************************************************************/
  38. /* ????ò?é?′?íê3éμ?êy?Y */
  39. /************************************************************************/
  40. int ClearUploadedPaperImg();
  41. /************************************************************************/
  42. /* ???üê?±e */
  43. /************************************************************************/
  44. int AiReadImgPaper(int subject, int id, std::vector<questionAi> aiVec, const std::vector<CString> imgPath, std::vector<std::vector<AI_RET_RECT2>> &retList);
  45. const boost::shared_ptr<CImgUploader>& GetImgUploader();
  46. ThreadPool *getThreadPool();
  47. ThreadPool m_threadPool;
  48. void logForDbg(std::string strLog);
  49. private:
  50. boost::shared_ptr<CImgUploader> imgUploader_;
  51. };