Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | List of all members
ola::plugin::usbdmx::BaseWidgetFactory< WidgetType > Class Template Reference

Detailed Description

template<typename WidgetType>
class ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >

A partial implementation of WidgetFactory.

This handles the mapping of libusb_devices to widgets and notifying the observer when widgets are added or removed.

Inheritance diagram for ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >:
Inheritance graph
Collaboration diagram for ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >:
Collaboration graph

Public Member Functions

 BaseWidgetFactory (const std::string &name)
std::string Name () const
 The name of this factory. More...
- Public Member Functions inherited from ola::plugin::usbdmx::WidgetFactory
virtual bool DeviceAdded (WidgetObserver *observer, libusb_device *usb_device, const struct libusb_device_descriptor &descriptor)=0
 Called when a new USB device is added. More...

Protected Member Functions

bool AddWidget (WidgetObserver *observer, WidgetType *widget)
 Initialize a widget and notify the observer. More...

Member Function Documentation

template<typename WidgetType>
bool ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >::AddWidget ( WidgetObserver observer,
WidgetType *  widget 

Initialize a widget and notify the observer.

observerThe WidgetObserver to notify of the new widget.
widgetthe new Widget, ownership is transferred.
True if the widget was added, false otherwise.
template<typename WidgetType>
std::string ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >::Name ( ) const

The name of this factory.

The name of this factory.

Implements ola::plugin::usbdmx::WidgetFactory.

The documentation for this class was generated from the following file: