DetectorLib.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef __MAS_DETECTORLIB_H
  2. #define __MAS_DETECTORLIB_H
  3. #include "Detector.h"
  4. #define INITIALIZE_DETECTOR_SYMBOL "Initialize"
  5. #define DISPOSE_DETECTOR_SYMBOL "Dispose"
  6. #define BUILD_DETECTOR_SYMBOL "BuildDetector"
  7. #define DESTROY_DETECTOR_SYMBOL "DestroyDetector"
  8. #define INFO_DETECTOR_SYMBOL "GetInformation"
  9. typedef TZ_INT(*DET_Initialize)();
  10. typedef TZ_INT(*DET_Dispose)();
  11. typedef masd::Detector * (* DET_BuildDetector)();
  12. typedef TZ_INT(* DET_DestroyDetector)(masd::Detector *);
  13. typedef TZ_INT(* DET_GetInformation)(TZ_CHAR *);
  14. NAMESPACE_MAS_BEGIN
  15. class DetectorLib {
  16. public:
  17. DetectorLib(const std::string & path);
  18. ~DetectorLib();
  19. TZ_INT Initialize(DetectorInfo & info);
  20. TZ_INT DestroyDetector(masd::Detector * pdet);
  21. TZ_INT GetInformation(std::string & info);
  22. Detector * BuildDetector();
  23. void GetDetLibKey(std::string & detKey);
  24. private:
  25. std::string m_path;
  26. std::string m_detKey;
  27. TZ_DLLHD m_sohd;
  28. DET_Initialize m_initialize;
  29. DET_Dispose m_dispose;
  30. DET_BuildDetector m_buildDetector;
  31. DET_DestroyDetector m_destroyDetector;
  32. DET_GetInformation m_getInformation;
  33. };
  34. NAMESPACE_MAS_END
  35. #endif