hueplusplus  1.0.0
ColorHueStrategy.h
Go to the documentation of this file.
1 
23 #ifndef _COLOR_HUE_STRATEGY_H
24 #define _COLOR_HUE_STRATEGY_H
25 
26 #include <cstdint>
27 #include <memory>
28 
29 #include "ColorUnits.h"
30 
31 namespace hueplusplus
32 {
33 class Light;
34 
37 {
38 public:
47  virtual bool setColorHue(uint16_t hue, uint8_t transition, Light& light) const = 0;
56  virtual bool setColorSaturation(uint8_t sat, uint8_t transition, Light& light) const = 0;
64  virtual bool setColorHueSaturation(const HueSaturation& hueSat, uint8_t transition, Light& light) const = 0;
72  virtual bool setColorXY(const XYBrightness& xy, uint8_t transition, Light& light) const = 0;
73 
86  virtual bool setColorLoop(bool on, Light& light) const = 0;
92  virtual bool alertHueSaturation(const HueSaturation& hueSat, Light& light) const = 0;
98  virtual bool alertXY(const XYBrightness& xy, Light& light) const = 0;
104  virtual HueSaturation getColorHueSaturation(Light& light) const = 0;
110  virtual HueSaturation getColorHueSaturation(const Light& light) const = 0;
116  virtual XYBrightness getColorXY(Light& light) const = 0;
122  virtual XYBrightness getColorXY(const Light& light) const = 0;
124  virtual ~ColorHueStrategy() = default;
125 };
126 } // namespace hueplusplus
127 
128 #endif
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...
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.
Namespace for the hueplusplus library.
Definition: Action.h:27
Virtual base class for all ColorHueStrategies.
Definition: ColorHueStrategy.h:36
virtual XYBrightness getColorXY(Light &light) const =0
Virtual function that returns the current color of the light as xy.
virtual HueSaturation getColorHueSaturation(Light &light) const =0
Virtual function that returns the current color of the light as hue and saturation.
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.
virtual bool setColorLoop(bool on, Light &light) const =0
Virtual function for turning on/off the color loop feature of a light.
Color and brightness in CIE.
Definition: ColorUnits.h:62
virtual bool alertHueSaturation(const HueSaturation &hueSat, Light &light) const =0
Virtual function that lets the light perform one breath cycle in the specified color.
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.
Class for Hue Light fixtures.
Definition: Light.h:60
virtual ~ColorHueStrategy()=default
Virtual dtor.
Color in hue and saturation.
Definition: ColorUnits.h:31
virtual bool alertXY(const XYBrightness &xy, Light &light) const =0
Virtual function that lets the light perform one breath cycle in the specified color.