![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/ElementwiseDataComponentList.h>
Class for managing multiple DataComponentLists for individual elements. More...
Inheritance diagram for ElementwiseDataComponentList:Class for managing multiple DataComponentLists for individual elements.
The purpose of the ElementwiseDataComponentList is to store individual DataComponentLists for a range of elements. Each element may store different DataComponent of the same type. The elements in question may be individual images in SharedImageSet, or frames of a TrackingSequence. For example, it is used for storing stream metadata, which may vary on a per-frame basis.
This class implements a basic copy-on-write pattern for de-duplication of DataComponents of consecutive elements.
Public Member Functions | |
| ElementwiseDataComponentList ()=default | |
| Creates a new ElementwiseDataComponentList for the given data. | |
| ElementwiseDataComponentList (const ElementwiseDataComponentList &rhs) | |
| ElementwiseDataComponentList & | operator= (const ElementwiseDataComponentList &rhs) |
| ElementwiseDataComponentList (ElementwiseDataComponentList &&other) noexcept | |
| ElementwiseDataComponentList & | operator= (ElementwiseDataComponentList &&other) noexcept |
| void | add (const DataComponentList &dcl) |
| Add a new element with the given list of DataComponents. | |
| void | set (int index, const DataComponentList &dcl) |
| Set the DataComponents of the specified index, growing the list if necessary. | |
| DataComponentList & | mutableElement (int which) |
| Returns a reference to the specified list, or an empty list if the index is outside the range. | |
| const DataComponentList & | element (int which) const |
| Returns a const reference to the specified list, or an empty list if the index is outside the range. | |
| void | clear () |
| Clear all recorded data components. | |
| int | size () const |
| Returns the number of DataComponentLists. | |
| void | removeElement (int index, int count=1) |
| Remove count elements starting at the specified index. | |
| void | sortElements (const std::vector< int > &indexMap) |
| Sort elements according to the provided index map. | |
| void | forEach (const std::function< void(DataComponentList &dcl)> &lambda) |
| Perform an action on each stored DataComponentLists, regardless for how many elements each is valid for. | |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
| DataComponentList & mutableElement | ( | int | which | ) |
Returns a reference to the specified list, or an empty list if the index is outside the range.
| void forEach | ( | const std::function< void(DataComponentList &dcl)> & | lambda | ) |
Perform an action on each stored DataComponentLists, regardless for how many elements each is valid for.
Helpful due to the otherwise hidden de-duplication scheme since element() is const, and performing changes using mutableElement() will cause duplication.
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.