hyperion.ng/include/leddevice/LedDeviceFactory.h
redPanther 5aac2be702 Leddevice refactoring the next next part (#263)
* switch rs232 provider to completly async transfer

* start of implementing a seperate init function for leddevices

* rename setconfig to init

* more fixes

* implement missing code

* fix code style

* remove debug  code

* remove  debug stuff

* set loglevel to original state
2016-10-08 08:14:36 +02:00

28 lines
610 B
C++

#pragma once
// Json includes
#include <json/json.h>
// 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
///
static LedDevice * construct(const Json::Value & deviceConfig, const int ledCount);
};