DeviceHandlerManager.h 596 B

123456789101112131415161718192021222324
  1. #pragma once
  2. namespace DIOS::Dev::Detail::MachineryECOM
  3. {
  4. class IDeviceHandler;
  5. class IDeviceHandlerFactory;
  6. const std::string DEVICE_HANDLER_COLLIMATOR = "DEVICE_HANDLER_COLLIMATOR";
  7. class DeviceHandlerManager
  8. {
  9. public:
  10. DeviceHandlerManager();
  11. ~DeviceHandlerManager();
  12. public:
  13. static DeviceHandlerManager *Instance();
  14. void Initialize(IDeviceHandlerFactory *factory);
  15. void Register(IDeviceHandler *handler);
  16. IDeviceHandler *Resove(const std::string &name);
  17. private:
  18. static DeviceHandlerManager *m_instance;
  19. std::map<std::string, IDeviceHandler*> m_deviceHandlers;
  20. };
  21. }