class
LightLayoutAttributesThis class describes a lighting layout, consisting of a series of lights.
Base classes
- class AbstractAttributes
- Base class for all implemented attributes. Inherits from esp::
core:: managedContainers:: AbstractFileBasedManagedObject so the attributes can be managed by a esp:: core:: managedContainers:: ManagedContainer.
Constructors, destructors, conversion operators
-
LightLayoutAttributes(const std::
string& handle = "") explicit - LightLayoutAttributes(const LightLayoutAttributes& otr)
- LightLayoutAttributes(LightLayoutAttributes&& otr) noexcept
Public functions
- auto operator=(const LightLayoutAttributes& otr) -> LightLayoutAttributes&
- auto operator=(LightLayoutAttributes&& otr) -> LightLayoutAttributes& noexcept
- void setPositiveIntensityScale(double positive_intensity_scale)
- Set a scale of all positive intensities by specified amount. This is to make simple, sweeping adjustments to scene lighting in habitat.
- auto getPositiveIntensityScale() const -> double
- Get a scale of all positive intensities by specified amount. This is to make simple, sweeping adjustments to scene lighting in habitat.
- void setNegativeIntensityScale(double negative_intensity_scale)
- Set a scale of all negative intensities by specified amount. This is to make simple, sweeping adjustments to scene lighting in habitat.
- auto getNegativeIntensityScale() const -> double
- Get a scale of all negative intensities by specified amount. This is to make simple, sweeping adjustments to scene lighting in habitat.
- void addLightInstance(LightInstanceAttributes::ptr _lightInstance)
- Add a LightInstanceAttributes to this lighting layout.
-
auto removeLightInstance(const std::
string& handle) -> LightInstanceAttributes::ptr - Remove a named LightInstanceAttributes from this lighting layout.
-
auto getLightInstance(const std::
string& handle) -> LightInstanceAttributes::cptr - Retrieve a reference to the named LightInstanceAttributes.
-
auto getLightInstances() const -> std::
vector<LightInstanceAttributes::cptr> - Get all the LightInstanceAttributes for this layout.
- auto getNumLightInstances() const -> int
- Return how many lights are in this light layout - number of LightInstanceAttributes in lightInstConfig_
subconfig. - void writeValuesToJson(io::JsonGenericValue& jsonObj, io::JsonAllocator& allocator) const override
- Populate a json object with all the first-level values held in this configuration. Default is overridden to handle special cases for LightLayoutAttributes.
Protected functions
-
auto getObjectInfoHeaderInternal() const -> std::
string override - Retrieve a comma-separated string holding the header values for the info returned for this managed object, type-specific. The individual light instances return a header for this.
-
auto getObjectInfoInternal() const -> std::
string override - Retrieve a comma-separated informational string about the contents of this managed object.
Protected variables
-
std::
shared_ptr<Configuration> lightInstConfig_ - Smartpointer to created LightInstanceAttributes configuration. The configuration is created on LightLayoutAttributes construction.
-
std::
deque<int> availableLightIDs_ - Deque holding all released IDs to consume for LightInstanceAttributes when one is deleted, before using size of lightInstances_ container.