ImFusion C++ SDK 4.4.0
ImFusion::ML::InversionComponent Class Reference

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

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

Inheritance diagram for ImFusion::ML::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.
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.
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 ImFusion::DataComponent< InversionComponent >
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.
Public Member Functions inherited from ImFusion::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 ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Member Functions inherited from ImFusion::DataComponentBase
 DataComponentBase (const DataComponentBase &)=default
DataComponentBase & operator= (const DataComponentBase &other)=default
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ recordInversion() [1/4]

void ImFusion::ML::InversionComponent::recordInversion ( const Operation & operation)

Record inversion information for an operation.

Parameters
operationThe operation to record inversion for

◆ recordInversion() [2/4]

void ImFusion::ML::InversionComponent::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 ImFusion::ML::InversionComponent::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 ImFusion::ML::InversionComponent::recordInversion ( const InversionInfo & info)

Record complete inversion information.

Parameters
infoThe complete inversion information to record

◆ getInversionInfo() [1/2]

InversionInfo * ImFusion::ML::InversionComponent::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 * ImFusion::ML::InversionComponent::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 * > ImFusion::ML::InversionComponent::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 * > ImFusion::ML::InversionComponent::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 > ImFusion::ML::InversionComponent::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 ImFusion::ML::InversionComponent::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 > ImFusion::ML::InversionComponent::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 ImFusion::ML::InversionComponent::id ( ) const
inlineoverridevirtual

Get component ID.

Implements ImFusion::DataComponentBase.

◆ configure()

void ImFusion::ML::InversionComponent::configure ( const Properties * props)
overridevirtual

Configure from properties.

Reimplemented from ImFusion::Configurable.

◆ configuration()

void ImFusion::ML::InversionComponent::configuration ( Properties * props) const
overridevirtual

Save to properties.

Reimplemented from ImFusion::Configurable.


The documentation for this class was generated from the following file:
  • ImFusion/ML/DataComponents/InversionComponent.h
Search Tab / S to search, Esc to close