![]() |
ImFusion SDK 4.3
|
#include <ImFusion/ML/DataComponents/InversionComponent.h>
Data component for storing operation inversion information. More...
Data component for storing operation inversion information.
This component stores the information needed to invert operations that have been applied to data. It works in conjunction with InvertibleOperation classes.
Operations can register their inversion specifications by calling recordInversion() with a unique identifier and the specifications needed to create the inverse operation. If data-dependent inversion parameters are needed, the operation can add these to the DataElements's InversionInfo.
Classes | |
struct | InversionInfo |
A structure to store all information needed for operation inversion. More... | |
Public Member Functions | |
InversionComponent (const InversionComponent &)=default | |
Copy constructor. | |
InversionComponent & | operator= (const InversionComponent &)=default |
Assignment operator. | |
bool | operator== (const InversionComponent &other) const |
Equality comparison operator. | |
bool | operator!= (const InversionComponent &other) const |
Inequality comparison operator. | |
InversionComponent | operator+ (const InversionComponent &other) const |
Addition operator to combine two InversionComponents. | |
InversionComponent & | operator+= (const InversionComponent &other) |
Addition assignment operator to combine two InversionComponents. | |
void | recordInversion (const Operation &operation) |
Record inversion information for an operation. | |
void | recordInversion (const std::string &identifier, const Operation::Specs &specs) |
Record inversion information with custom identifier and specs. | |
void | recordInversion (const std::string &identifier, const Operation::Specs &specs, const Properties &contextProps) |
Record inversion information with additional context properties. | |
void | recordInversion (const InversionInfo &info) |
Record complete inversion information. | |
InversionInfo * | getInversionInfo (const std::string &identifier) |
Get a reference to the inversion information for an operation. | |
const InversionInfo * | getInversionInfo (const std::string &identifier) const |
Get a reference to the inversion information for an operation. | |
std::vector< InversionInfo * > | getAllInversionInfos (const std::string &identifier) |
Get all references to inversion infos for an identifier in sequence order. | |
std::vector< const InversionInfo * > | getAllInversionInfos (const std::string &identifier) const |
Get all references to inversion infos for an identifier in sequence order. | |
std::optional< Operation::Specs > | inverseSpecs (const std::string &identifier) const |
Get the inversion specifications for an operation. | |
bool | hasInversion (const std::string &identifier) const |
Check if inversion info is available for an identifier. | |
std::optional< InversionInfo > | popInversionInfo (const std::string &identifier) |
Pop the most recent inversion info for an identifier. | |
std::string | id () const override |
Get component ID. | |
void | configure (const Properties *props) override |
Configure from properties. | |
void | configuration (Properties *props) const override |
Save to properties. | |
![]() | |
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. | |
void recordInversion | ( | const Operation & | operation | ) |
Record inversion information for an operation.
operation | The operation to record inversion for |
void recordInversion | ( | const std::string & | identifier, |
const Operation::Specs & | specs ) |
Record inversion information with custom identifier and specs.
identifier | The identifier to associate with this info |
specs | The specifications needed to create the inverse operation |
void recordInversion | ( | const std::string & | identifier, |
const Operation::Specs & | specs, | ||
const Properties & | contextProps ) |
Record inversion information with additional context properties.
identifier | The identifier to associate with this info |
specs | The specifications for the inverse operation |
contextProps | Additional context properties needed for inversion |
void recordInversion | ( | const InversionInfo & | info | ) |
Record complete inversion information.
info | The complete inversion information to record |
InversionInfo * getInversionInfo | ( | const std::string & | identifier | ) |
Get a reference to the inversion information for an operation.
identifier | The identifier of the operation to get info for |
const InversionInfo * getInversionInfo | ( | const std::string & | identifier | ) | const |
Get a reference to the inversion information for an operation.
identifier | The identifier of the operation to get info for |
std::vector< InversionInfo * > getAllInversionInfos | ( | const std::string & | identifier | ) |
Get all references to inversion infos for an identifier in sequence order.
identifier | The identifier to get all infos for |
std::vector< const InversionInfo * > getAllInversionInfos | ( | const std::string & | identifier | ) | const |
Get all references to inversion infos for an identifier in sequence order.
identifier | The identifier to get all infos for |
std::optional< Operation::Specs > inverseSpecs | ( | const std::string & | identifier | ) | const |
Get the inversion specifications for an operation.
identifier | The identifier of the operation to get specs for |
bool hasInversion | ( | const std::string & | identifier | ) | const |
Check if inversion info is available for an identifier.
identifier | The identifier to check |
std::optional< InversionInfo > popInversionInfo | ( | const std::string & | identifier | ) |
Pop the most recent inversion info for an identifier.
identifier | The identifier to pop |
|
inlineoverridevirtual |
Get component ID.
Implements DataComponentBase.
|
overridevirtual |
Configure from properties.
Reimplemented from Configurable.
|
overridevirtual |
Save to properties.
Reimplemented from Configurable.