Loading...
Searching...
No Matches
ColorHueStrategy.h
Go to the documentation of this file.
#ifndef _COLOR_HUE_STRATEGY_H
#define _COLOR_HUE_STRATEGY_H
#include <cstdint>
#include <memory>
#include "ColorUnits.h"
namespace hueplusplus
{
class Light;
class ColorHueStrategy
{
public:
virtual bool setColorHue(uint16_t hue, uint8_t transition, Light& light) const = 0;
virtual bool setColorSaturation(uint8_t sat, uint8_t transition, Light& light) const = 0;
virtual bool setColorHueSaturation(const HueSaturation& hueSat, uint8_t transition, Light& light) const = 0;
virtual bool setColorXY(const XYBrightness& xy, uint8_t transition, Light& light) const = 0;
virtual bool setColorLoop(bool on, Light& light) const = 0;
virtual bool alertHueSaturation(const HueSaturation& hueSat, Light& light) const = 0;
virtual bool alertXY(const XYBrightness& xy, Light& light) const = 0;
virtual HueSaturation getColorHueSaturation(Light& light) const = 0;
virtual HueSaturation getColorHueSaturation(const Light& light) const = 0;
virtual XYBrightness getColorXY(Light& light) const = 0;
virtual XYBrightness getColorXY(const Light& light) const = 0;
virtual ~ColorHueStrategy() = default;
};
} // namespace hueplusplus
#endif
ColorUnits.h
hueplusplus::ColorHueStrategy
Virtual base class for all ColorHueStrategies.
Definition ColorHueStrategy.h:37
hueplusplus::ColorHueStrategy::setColorLoop
virtual bool setColorLoop(bool on, Light &light) const =0
Virtual function for turning on/off the color loop feature of a light.
hueplusplus::ColorHueStrategy::alertHueSaturation
virtual bool alertHueSaturation(const HueSaturation &hueSat, Light &light) const =0
Virtual function that lets the light perform one breath cycle in the specified color.
hueplusplus::ColorHueStrategy::getColorXY
virtual XYBrightness getColorXY(Light &light) const =0
Virtual function that returns the current color of the light as xy.
hueplusplus::ColorHueStrategy::getColorHueSaturation
virtual HueSaturation getColorHueSaturation(Light &light) const =0
Virtual function that returns the current color of the light as hue and saturation.
hueplusplus::ColorHueStrategy::getColorHueSaturation
virtual HueSaturation getColorHueSaturation(const Light &light) const =0
Virtual function that returns the current color of the light as hue and saturation.
hueplusplus::ColorHueStrategy::getColorXY
virtual XYBrightness getColorXY(const Light &light) const =0
Virtual function that returns the current color of the light as xy.
hueplusplus::ColorHueStrategy::alertXY
virtual bool alertXY(const XYBrightness &xy, Light &light) const =0
Virtual function that lets the light perform one breath cycle in the specified color.
hueplusplus::ColorHueStrategy::setColorXY
virtual bool setColorXY(const XYBrightness &xy, uint8_t transition, Light &light) const =0
Virtual function for changing a lights color in CIE format with a specified transition.
hueplusplus::ColorHueStrategy::setColorSaturation
virtual bool setColorSaturation(uint8_t sat, uint8_t transition, Light &light) const =0
Virtual function for changing a lights color in saturation with a specified transition.
hueplusplus::ColorHueStrategy::setColorHue
virtual bool setColorHue(uint16_t hue, uint8_t transition, Light &light) const =0
Virtual function for changing a lights color in hue with a specified transition.
hueplusplus::ColorHueStrategy::setColorHueSaturation
virtual bool setColorHueSaturation(const HueSaturation &hueSat, uint8_t transition, Light &light) const =0
Virtual function for changing a lights color in hue and saturation format with a specified transition...
hueplusplus::ColorHueStrategy::~ColorHueStrategy
virtual ~ColorHueStrategy()=default
Virtual dtor.
hueplusplus::Light
Class for Hue Light fixtures.
Definition Light.h:61
hueplusplus
Namespace for the hueplusplus library.
Definition Action.h:28
hueplusplus::HueSaturation
Color in hue and saturation.
Definition ColorUnits.h:32
hueplusplus::XYBrightness
Color and brightness in CIE.
Definition ColorUnits.h:63