21 #ifndef PLUGINS_USBDMX_WIDGETFACTORY_H_
22 #define PLUGINS_USBDMX_WIDGETFACTORY_H_
181 libusb_device *usb_device,
182 const struct libusb_device_descriptor &descriptor) = 0;
191 libusb_device *usb_device) = 0;
200 template <
typename W
idgetType>
206 libusb_device *device);
224 return m_widget_map.size();
238 typedef std::map<libusb_device*, WidgetType*> WidgetMap;
240 WidgetMap m_widget_map;
245 template <
typename W
idgetType>
247 libusb_device *usb_device,
248 WidgetType *widget) {
249 if (!widget->Init()) {
259 WidgetType *old_widget =
STLReplacePtr(&m_widget_map, usb_device, widget);
262 OLA_WARN <<
"Widget conflict for " << usb_device;
269 template <
typename W
idgetType>
271 libusb_device *usb_device) {
281 #endif // PLUGINS_USBDMX_WIDGETFACTORY_H_