![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/DataSourceComponent.h>
Data component for keeping track of the data's origin. More...
Data component for keeping track of the data's origin.
This data component introduces the DataSourceInfo struct, which provides members for keeping track of the original filename and IoAlgorithm+configuration that was used to load it. The component itself keeps a vector of DataSourceInfo elements, one for each file (since data from different files may be combined into a single SIS).
If data from multiple files is combined into a single SIS, their DataSourceComponents can be combined by summation (operator+
or operator+=
) and added to the new SIS.
Classes | |
struct | DataSourceInfo |
Simple struct for storing the original filename of a data, how it has been loaded and the history of its sources. More... | |
Public Member Functions | |
DataSourceComponent (std::vector< DataSourceInfo > sourceInfo) | |
DataSourceComponent (const DataSourceComponent &other)=default | |
DataSourceComponent & | operator= (const DataSourceComponent &other)=default |
bool | operator== (const DataSourceComponent &other) const |
std::string | id () const override |
Returns a unique string identifier for this type of data component. | |
DataSourceComponent | operator+ (const DataSourceComponent &other) const |
Combines DataSourceInfo elements from this and other into a new DataSourceComponent | |
DataSourceComponent & | operator+= (const DataSourceComponent &other) |
Appends a data source info to the data component. | |
DataSourceComponent & | operator+= (const DataSourceInfo &other) |
Appends a data source info to the data component. | |
void | updateSources (const DataSourceInfo &other, const Data &refData) |
Helper function to move all current infos to their history and add a new source info. | |
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. | |
std::vector< DataSourceInfo > & | sources () |
Returns the current DataSourceInfo vector. | |
const std::vector< DataSourceInfo > & | sources () const |
Returns the current DataSourceInfo vector. | |
std::vector< std::string > | filenames () const |
Returns only the filename member of the current DataSourceInfo elements. | |
![]() | |
std::unique_ptr< DataComponentBase > | clone () const override |
Creates a clone of this data component. | |
std::unique_ptr< Subclass > | cloneDerived () const |
bool | assign (const DataComponentBase &other) override |
Assigns the content of other to this data component. | |
bool | equals (const DataComponentBase &other) const override |
Compares this data component to other for equality. | |
![]() | |
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 | |
![]() | |
Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
![]() | |
DataComponentBase (const DataComponentBase &)=default | |
DataComponentBase & | operator= (const DataComponentBase &other)=default |
![]() | |
std::vector< Param > | m_params |
List of all registered Parameter and SubProperty instances. | |
|
inlineoverridevirtual |
Returns a unique string identifier for this type of data component.
Implements DataComponentBase.
void updateSources | ( | const DataSourceInfo & | other, |
const Data & | refData ) |
Helper function to move all current infos to their history and add a new source info.
If there is no current info, the vector will be filled with the apprioriate number of instances, depending on the reference data. For instance, if the reference data is a SharedImageSet with 5 frames, a vector of size 5 will be created.
|
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.