OnlineCardIdentifyService.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #include "stdafx.h"
  2. #include "OnlineCardIdentifyService.h"
  3. #include "OnlineCardIdentifor.h"
  4. #include "OnlineResultHandler.h"
  5. #include "OnlineCardStudentMatcher.h"
  6. namespace OnLineCard{
  7. COnlineCardIdentifyService::COnlineCardIdentifyService(CBatchService *batchService)
  8. :CIdentifyService(batchService)
  9. {
  10. }
  11. COnlineCardIdentifyService::~COnlineCardIdentifyService()
  12. {
  13. }
  14. void COnlineCardIdentifyService::InitService()
  15. {
  16. m_identifor = boost::make_shared<COnlineCardIdentifor>();
  17. m_result_handler = boost::make_shared<COnlineResultHandler>();
  18. m_result_handler->m_nOnlineScanType = m_nOnlineScanType;
  19. m_student_matcher = boost::make_shared<COnlineCardStudentMatcher>();
  20. m_student_matcher->m_nOnlineScanType = m_nOnlineScanType;
  21. m_identifor->IdentifyTaskManager(taskManager.get());
  22. m_identifor->SetOnlineScanType(m_nOnlineScanType);
  23. m_result_handler->IdentifyTaskManager(taskManager.get());
  24. }
  25. void COnlineCardIdentifyService::SetTemplate(PaperTemplate*pT)
  26. {
  27. (static_cast<COnlineCardIdentifor*>(m_identifor.get()))->SetTemplate(pT);
  28. }
  29. }