hyperion.ng/include/leddevice/LedDeviceFactory.h
T. van der Zwan b63753f5dc Moved all devices to separate library and added 'Factory' for device creation.
Former-commit-id: 26cab1b85b00406240689ad9c1018f0307028fe4
2013-12-17 18:50:15 +00:00

28 lines
590 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);
};