ImFusion SDK 4.3
InversionComponent Class Reference

#include <ImFusion/ML/DataComponents/InversionComponent.h>

Data component for storing operation inversion information. More...

+ Inheritance diagram for InversionComponent:

Detailed Description

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.
 
InversionComponentoperator= (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.
 
InversionComponentoperator+= (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.
 
InversionInfogetInversionInfo (const std::string &identifier)
 Get a reference to the inversion information for an operation.
 
const InversionInfogetInversionInfo (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::SpecsinverseSpecs (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< InversionInfopopInversionInfo (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.
 
- Public Member Functions inherited from DataComponent< InversionComponent >
std::unique_ptr< DataComponentBaseclone () const override
 Creates a clone of this data component.
 
std::unique_ptr< SubclasscloneDerived () 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.
 
- 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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (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 Member Functions inherited from DataComponentBase
 DataComponentBase (const DataComponentBase &)=default
 
DataComponentBaseoperator= (const DataComponentBase &other)=default
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ recordInversion() [1/4]

void recordInversion ( const Operation & operation)

Record inversion information for an operation.

Parameters
operationThe operation to record inversion for

◆ recordInversion() [2/4]

void recordInversion ( const std::string & identifier,
const Operation::Specs & specs )

Record inversion information with custom identifier and specs.

Parameters
identifierThe identifier to associate with this info
specsThe specifications needed to create the inverse operation

◆ recordInversion() [3/4]

void recordInversion ( const std::string & identifier,
const Operation::Specs & specs,
const Properties & contextProps )

Record inversion information with additional context properties.

Parameters
identifierThe identifier to associate with this info
specsThe specifications for the inverse operation
contextPropsAdditional context properties needed for inversion

◆ recordInversion() [4/4]

void recordInversion ( const InversionInfo & info)

Record complete inversion information.

Parameters
infoThe complete inversion information to record

◆ getInversionInfo() [1/2]

InversionInfo * getInversionInfo ( const std::string & identifier)

Get a reference to the inversion information for an operation.

Parameters
identifierThe identifier of the operation to get info for
Returns
The most recently recorded InversionInfo if found, or nullptr if not found

◆ getInversionInfo() [2/2]

const InversionInfo * getInversionInfo ( const std::string & identifier) const

Get a reference to the inversion information for an operation.

Parameters
identifierThe identifier of the operation to get info for
Returns
The most recently recorded InversionInfo if found, or nullptr if not found

◆ getAllInversionInfos() [1/2]

std::vector< InversionInfo * > getAllInversionInfos ( const std::string & identifier)

Get all references to inversion infos for an identifier in sequence order.

Parameters
identifierThe identifier to get all infos for
Returns
Vector of all InversionInfos with the given identifier

◆ getAllInversionInfos() [2/2]

std::vector< const InversionInfo * > getAllInversionInfos ( const std::string & identifier) const

Get all references to inversion infos for an identifier in sequence order.

Parameters
identifierThe identifier to get all infos for
Returns
Vector of all InversionInfos with the given identifier

◆ inverseSpecs()

std::optional< Operation::Specs > inverseSpecs ( const std::string & identifier) const

Get the inversion specifications for an operation.

Parameters
identifierThe identifier of the operation to get specs for
Returns
The specs if found, or nullopt if not found

◆ hasInversion()

bool hasInversion ( const std::string & identifier) const

Check if inversion info is available for an identifier.

Parameters
identifierThe identifier to check
Returns
True if info is available, false otherwise

◆ popInversionInfo()

std::optional< InversionInfo > popInversionInfo ( const std::string & identifier)

Pop the most recent inversion info for an identifier.

Parameters
identifierThe identifier to pop
Returns
The popped InversionInfo or nullopt if not found

◆ id()

std::string id ( ) const
inlineoverridevirtual

Get component ID.

Implements DataComponentBase.

◆ configure()

void configure ( const Properties * props)
overridevirtual

Configure from properties.

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * props) const
overridevirtual

Save to properties.

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close