2020-07-12 20:27:56 +02:00
|
|
|
#ifndef LEDEVICEFACTORY_H
|
|
|
|
#define LEDEVICEFACTORY_H
|
2013-12-17 19:50:15 +01:00
|
|
|
|
2020-08-08 23:12:43 +02:00
|
|
|
class LedDevice;
|
|
|
|
class QJsonObject;
|
2013-12-17 19:50:15 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// 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
|
2020-07-12 20:27:56 +02:00
|
|
|
/// the constructed LedDevice is transferred to the caller
|
2013-12-17 19:50:15 +01:00
|
|
|
///
|
2018-12-27 23:11:32 +01:00
|
|
|
static LedDevice * construct(const QJsonObject & deviceConfig);
|
2013-12-17 19:50:15 +01:00
|
|
|
};
|
2020-07-12 20:27:56 +02:00
|
|
|
|
|
|
|
#endif // LEDEVICEFACTORY_H
|