2013-12-17 19:50:15 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Leddevice includes
|
|
|
|
#include <leddevice/LedDevice.h>
|
|
|
|
|
|
|
|
///
|
|
|
|
/// The LedDeviceFactory is responsible for constructing 'LedDevices'
|
|
|
|
///
|
|
|
|
class LedDeviceFactory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
///
|
|
|
|
/// Constructs a LedDevice based on the given configuration
|
|
|
|
///
|
|
|
|
/// @param deviceConfig The configuration of the led-device
|
|
|
|
///
|
|
|
|
/// @return The constructed LedDevice or nullptr if configuration is invalid. The ownership of
|
|
|
|
/// the constructed LedDevice is tranferred to the caller
|
|
|
|
///
|
2018-12-27 23:11:32 +01:00
|
|
|
static LedDevice * construct(const QJsonObject & deviceConfig);
|
2013-12-17 19:50:15 +01:00
|
|
|
};
|