hyperion.ng/include/hyperion/ImageProcessorFactory.h
johan 293a2e7c19 Added reading the enable flag for the border detector
Former-commit-id: d2cf4df9a7684107b30f9bc01d5aa90b321ce1b5
2013-10-20 22:27:05 +02:00

50 lines
1.1 KiB
C++

#pragma once
// STL includes
#include <memory>
// Jsoncpp includes
#include <json/json.h>
#include <hyperion/LedString.h>
// Forward class declaration
class ImageProcessor;
///
/// The ImageProcessor is a singleton factor for creating ImageProcessors that translate images to
/// led color values.
///
class ImageProcessorFactory
{
public:
///
/// Returns the 'singleton' instance (creates the singleton if it does not exist)
///
/// @return The singleton instance of the ImageProcessorFactory
///
static ImageProcessorFactory& getInstance();
public:
///
/// Initialises this factory with the given led-configuration
///
/// @param[in] ledString The led configuration
///
void init(const LedString& ledString, bool enableBlackBorderDetector);
///
/// Creates a new ImageProcessor. The onwership of the processor is transferred to the caller.
///
/// @return The newly created ImageProcessor
///
ImageProcessor* newImageProcessor() const;
private:
/// The Led-string specification
LedString _ledString;
/// Flag indicating if the black border detector should be used
bool _enableBlackBorderDetector;
};