Open Lighting Architecture: ola::plugin::usbdmx::BaseWidgetFactory< WidgetType > Class Template Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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 >:

## Public Member Functions
| BaseWidgetFactory (const std::string &name)
std::string | Name () const
| The name of this factory.
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.

## Protected Member Functions
bool | AddWidget (WidgetObserver *observer, WidgetType *widget)
| Initialize a widget and notify the observer.

## Member Function Documentation

## ◆ AddWidget()

template<typename WidgetType>

bool ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >::AddWidget | ( | WidgetObserver * | observer,
|  | WidgetType * | widget )
| protected

Initialize a widget and notify the observer.

Parameters

  observer | The WidgetObserver to notify of the new widget.
  widget | the new Widget, ownership is transferred.

Returns
  True if the widget was added, false otherwise.

## ◆ Name()

template<typename WidgetType>

std::string ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >::Name | ( |  | ) | const
| inlinevirtual

The name of this factory.

Returns
  The name of this factory.

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

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

- plugins/usbdmx/WidgetFactory.h