// // Created by xtkuang on 2025/5/13. // #ifndef CMVR_ES_DEVICE_FACTORY_H #define CMVR_ES_DEVICE_FACTORY_H #pragma once #include "devices/abstract_agv.h" #include "devices/abstract_battery.h" #include "devices/abstract_camera.h" #include "devices/abstract_dexhand.h" #include "devices/abstract_gripper.h" #include "devices/abstract_robot.h" #include "devices/abstract_microphone.h" #include "devices/abstract_speaker.h" #include "devices/abstract_biohead.h" namespace cmvr::device { class DeviceFactory { public: DeviceFactory() = default; template std::shared_ptr create(const XmlNode& cfg); private: std::shared_ptr create_agv_(const XmlNode& cfg); std::shared_ptr create_battery_(const XmlNode& cfg); std::shared_ptr create_camera_(const XmlNode& cfg); std::shared_ptr create_dexhand_(const XmlNode& cfg); std::shared_ptr create_gripper_(const XmlNode& cfg); std::shared_ptr create_mic_(const XmlNode& cfg); std::shared_ptr create_robot_(const XmlNode& cfg); std::shared_ptr create_speaker_(const XmlNode& cfg); std::shared_ptr create_biohead_(const XmlNode& cfg); }; } #endif //CMVR_ES_DEVICE_FACTORY_H