Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ComponentInstantiationInterface Class Reference

Interface for editing component instantiations. More...

#include <ComponentInstantiationInterface.h>

Inheritance diagram for ComponentInstantiationInterface:
ParameterizableInterface NameGroupInterface CommonInterface

Public Member Functions

 ComponentInstantiationInterface (QSharedPointer< InstantiationsValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, ParametersInterface *parameterInterface, ModuleParameterInterface *moduleParameterInterface, FileBuilderInterface *fileBuilderInterface, FileSetInterface *fileSetInterface)
 
virtual ~ComponentInstantiationInterface ()=default
 
void addComponentInstantiation (int const &row, std::string const &newInstantiationName=std::string(""))
 
virtual int getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override final
 
std::string getArchitectureName (std::string const &instantiationName) const
 
std::string getConfigurationName (std::string const &instantiationName) const
 
std::string getDisplayName (std::string const &itemName) const
 
std::vector< std::string > getExpressionsInSelectedItems (std::vector< std::string > instantiationNames) const
 
FileBuilderInterfacegetFileBuilderInterface () const
 
FileSetInterfacegetFileSetInterface () const
 
std::vector< std::string > getFileSetReferences (std::string const &instantiationName) const
 
std::string getIndexedItemName (int itemIndex) const final
 
virtual int getItemIndex (std::string const &itemName) const override final
 
virtual std::vector< std::string > getItemNames () const override final
 
std::string getLanguage (std::string const &instantiationName) const
 
std::string getLibraryName (std::string const &instantiationName) const
 
std::string getModuleName (std::string const &instantiationName) const
 
ModuleParameterInterfacegetModuleParameterInterface () const
 
std::string getPackageName (std::string const &instantiationName) const
 
ParametersInterfacegetParameterInterface () const
 
bool isLanguageStrict (std::string const &instantiationName) const
 
virtual int itemCount () const override final
 
virtual bool itemHasValidName (std::string const &itemName) const override final
 
bool removeComponentInstantiation (std::string const &instantiationName)
 
bool setArchitectureName (std::string const &instantiationName, std::string const &newArchitectureName)
 
void setComponentInstantiations (QSharedPointer< QList< QSharedPointer< ComponentInstantiation > > > newInstantiations)
 
bool setConfigurationName (std::string const &instantiationName, std::string const &newConfigurationName)
 
bool setDisplayName (std::string const &itemName, std::string const &newDisplayName)
 
bool setFileSetReferences (std::string const &instantiationName, std::vector< std::string > const &newReferences)
 
bool setLanguage (std::string const &instantiationName, std::string const &newLanguage)
 
bool setLanguageStrictness (std::string const &instantiationName, bool newStrictness)
 
bool setLibraryName (std::string const &instantiationName, std::string const &newLibraryName)
 
bool setModuleName (std::string const &instantiationName, std::string const &newModuleName)
 
virtual bool setName (std::string const &currentName, std::string const &newName) override final
 
bool setPackageName (std::string const &instantiationName, std::string const &newPackageName)
 
virtual bool validateItems () const override final
 
- Public Member Functions inherited from ParameterizableInterface
 ParameterizableInterface (const ParameterizableInterface &other)=delete
 No copying. No assignment.
 
 ParameterizableInterface (QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter)
 
virtual ~ParameterizableInterface ()=default
 
ParameterizableInterfaceoperator= (const ParameterizableInterface &other)=delete
 
- Public Member Functions inherited from NameGroupInterface
 NameGroupInterface ()
 
 NameGroupInterface (const NameGroupInterface &other)=delete
 No copying. No assignment.
 
virtual ~NameGroupInterface ()=default
 
virtual std::string getDescription (std::string const &itemName) const
 
virtual std::string getShortDescription (std::string const &itemName) const
 
NameGroupInterfaceoperator= (const NameGroupInterface &other)=delete
 
virtual bool setDescription (std::string const &itemName, std::string const &newDescription)
 
virtual bool setDisplayName (std::string const &itemName, std::string const &newDisplayName) const
 
bool setShortDescription (std::string const &itemName, std::string const &newShortDescription) const
 
- Public Member Functions inherited from CommonInterface
 CommonInterface ()=default
 
 CommonInterface (const CommonInterface &other)=delete
 No copying. No assignment.
 
virtual ~CommonInterface ()=default
 
CommonInterfaceoperator= (const CommonInterface &other)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from ParameterizableInterface
QString formattedValueFor (QString const &expression) const
 
QString parseExpressionToBaseNumber (QString const &expression, unsigned int const &baseNumber, bool *expressionIsValid=nullptr) const
 
QString parseExpressionToDecimal (QString const &expression, bool *expressionIsValid=nullptr) const
 
- Protected Member Functions inherited from CommonInterface
QString getUniqueName (std::string const &newName, std::string const &itemTypeName) const
 
bool nameHasChanged (std::string const &newName, std::string const &oldName) const
 

Detailed Description

Interface for editing component instantiations.

Definition at line 30 of file ComponentInstantiationInterface.h.

Constructor & Destructor Documentation

◆ ComponentInstantiationInterface()

ComponentInstantiationInterface::ComponentInstantiationInterface ( QSharedPointer< InstantiationsValidator > validator,
QSharedPointer< ExpressionParser > expressionParser,
QSharedPointer< ExpressionFormatter > expressionFormatter,
ParametersInterface * parameterInterface,
ModuleParameterInterface * moduleParameterInterface,
FileBuilderInterface * fileBuilderInterface,
FileSetInterface * fileSetInterface )

The constructor.

Parameters
[in]validatorValidator for address blocks.
[in]expressionParserParser for expressions.
[in]expressionFormatterFormatter for expressions.
[in]parameterInterfaceInterface for accessing parameters.
[in]moduleParameterInterfaceInterface for accessing module parameters
[in]fileBuilderInterfaceInterface for accessing file builders.
[in]fileSetInterfaceInterface for accessing file sets.

◆ ~ComponentInstantiationInterface()

virtual ComponentInstantiationInterface::~ComponentInstantiationInterface ( )
virtualdefault

The destructor.

Member Function Documentation

◆ addComponentInstantiation()

void ComponentInstantiationInterface::addComponentInstantiation ( int const & row,
std::string const & newInstantiationName = std::string("") )

Add a new component instantiation.

Parameters
[in]rowRow of the new component instantiation.
[in]newInstantiationNameName of the new component instantiation.

◆ getAllReferencesToIdInItem()

virtual int ComponentInstantiationInterface::getAllReferencesToIdInItem ( const std::string & itemName,
std::string const & valueID ) const
finaloverridevirtual

Calculate all the references to the selected ID in the selected item.

Parameters
[in]itemNameName of the selected item.
[in]valueIDThe selected ID.
Returns
Number of references to the selected ID in the selected item.

Implements ParameterizableInterface.

◆ getArchitectureName()

std::string ComponentInstantiationInterface::getArchitectureName ( std::string const & instantiationName) const

Get the architecture name of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Architecture name of the selected component instantiation.

◆ getConfigurationName()

std::string ComponentInstantiationInterface::getConfigurationName ( std::string const & instantiationName) const

Get the configuration name of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Configuration name of the selected component instantiation.

◆ getDisplayName()

std::string ComponentInstantiationInterface::getDisplayName ( std::string const & itemName) const
virtual

Get the display name of the selected item.

Parameters
[in]itemNameName of the selected item.
Returns
Display name of the selected item.

Reimplemented from NameGroupInterface.

◆ getExpressionsInSelectedItems()

std::vector< std::string > ComponentInstantiationInterface::getExpressionsInSelectedItems ( std::vector< std::string > instantiationNames) const

Get the expressions in the selected component instantiations.

Parameters
[in]instantiationNamesNames of the selected component instantiations.
Returns
Expressions in the selected component instantiations.

◆ getFileBuilderInterface()

FileBuilderInterface * ComponentInstantiationInterface::getFileBuilderInterface ( ) const

Get the file builder interface.

Returns
Interface for accessing file builders.

◆ getFileSetInterface()

FileSetInterface * ComponentInstantiationInterface::getFileSetInterface ( ) const

Get the file set interface.

Returns
Interface for accessing file sets.

◆ getFileSetReferences()

std::vector< std::string > ComponentInstantiationInterface::getFileSetReferences ( std::string const & instantiationName) const

Get the file set references of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
File set references of the selected component instantiation.

◆ getIndexedItemName()

std::string ComponentInstantiationInterface::getIndexedItemName ( int itemIndex) const
finalvirtual

Get name of the indexed item.

Parameters
[in]itemIndexIndex of the selected item.
Returns
Name of the selected item.

Implements NameGroupInterface.

◆ getItemIndex()

virtual int ComponentInstantiationInterface::getItemIndex ( std::string const & itemName) const
finaloverridevirtual

Get index of the selected item.

Parameters
[in]itemNameName of the selected item.
Returns
Index of the selected item.

Implements NameGroupInterface.

◆ getItemNames()

virtual std::vector< std::string > ComponentInstantiationInterface::getItemNames ( ) const
finaloverridevirtual

Get the names of the available items.

Returns
Names of the available items.

Implements CommonInterface.

◆ getLanguage()

std::string ComponentInstantiationInterface::getLanguage ( std::string const & instantiationName) const

Get the language of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Language of the selected component instantiation.

◆ getLibraryName()

std::string ComponentInstantiationInterface::getLibraryName ( std::string const & instantiationName) const

Get the library name of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Library name of the selected component instantiation.

◆ getModuleName()

std::string ComponentInstantiationInterface::getModuleName ( std::string const & instantiationName) const

Get the module name of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Module name of the selected component instantiation.

◆ getModuleParameterInterface()

ModuleParameterInterface * ComponentInstantiationInterface::getModuleParameterInterface ( ) const

Get the module parameter interface.

Returns
Interface for accessing module parameters.

◆ getPackageName()

std::string ComponentInstantiationInterface::getPackageName ( std::string const & instantiationName) const

Get the package name of the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Package name of the selected component instantiation.

◆ getParameterInterface()

ParametersInterface * ComponentInstantiationInterface::getParameterInterface ( ) const

Get the parameter interface.

Returns
Interface for accessing parameters.

◆ isLanguageStrict()

bool ComponentInstantiationInterface::isLanguageStrict ( std::string const & instantiationName) const

Check if the language of the selected component instantiation is strict.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
Language strictness of the selected component instantiation.

◆ itemCount()

virtual int ComponentInstantiationInterface::itemCount ( ) const
finaloverridevirtual

Get the number of available items.

Returns
Number of available items.

Implements CommonInterface.

◆ itemHasValidName()

virtual bool ComponentInstantiationInterface::itemHasValidName ( std::string const & itemName) const
finaloverridevirtual

Check if the selected item has a valid name.

Parameters
[in]itemNameName of the selected item.
Returns
True, if the name is valid, false otherwise.

Implements NameGroupInterface.

◆ removeComponentInstantiation()

bool ComponentInstantiationInterface::removeComponentInstantiation ( std::string const & instantiationName)

Remove the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
Returns
True, if successful, false otherwise.

◆ setArchitectureName()

bool ComponentInstantiationInterface::setArchitectureName ( std::string const & instantiationName,
std::string const & newArchitectureName )

Set a new architecture name for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newArchitectureNameThe new module name.
Returns
True, if successful, false otherwise.

◆ setComponentInstantiations()

void ComponentInstantiationInterface::setComponentInstantiations ( QSharedPointer< QList< QSharedPointer< ComponentInstantiation > > > newInstantiations)

Set available component instantiations.

Parameters
[in]newInstantiationsThe new component instantiations.

◆ setConfigurationName()

bool ComponentInstantiationInterface::setConfigurationName ( std::string const & instantiationName,
std::string const & newConfigurationName )

Set a new configuration name for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newConfigurationNameThe new module name.
Returns
True, if successful, false otherwise.

◆ setDisplayName()

bool ComponentInstantiationInterface::setDisplayName ( std::string const & itemName,
std::string const & newDisplayName )

Set the display name of the selected item.

Parameters
[in]itemNameName of the selected item.
[in]newDisplayNameNew display name for the item.
Returns
True, if successful, false otherwise.

◆ setFileSetReferences()

bool ComponentInstantiationInterface::setFileSetReferences ( std::string const & instantiationName,
std::vector< std::string > const & newReferences )

Set new file set references for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newReferencesThe new file set references.
Returns
True, if successful, false otherwise.

◆ setLanguage()

bool ComponentInstantiationInterface::setLanguage ( std::string const & instantiationName,
std::string const & newLanguage )

Set a new language for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newLanguageNew language.
Returns
True, if successful, false otherwise.

◆ setLanguageStrictness()

bool ComponentInstantiationInterface::setLanguageStrictness ( std::string const & instantiationName,
bool newStrictness )

Set language strictness for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newStrictnessThe new language strictness.
Returns
True, if successful, false otherwise.

◆ setLibraryName()

bool ComponentInstantiationInterface::setLibraryName ( std::string const & instantiationName,
std::string const & newLibraryName )

Set a new library name for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newLibraryNameThe new library name.
Returns
True, if successful, false otherwise.

◆ setModuleName()

bool ComponentInstantiationInterface::setModuleName ( std::string const & instantiationName,
std::string const & newModuleName )

Set a new module name for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newModuleNameThe new module name.
Returns
True, if successful, false otherwise.

◆ setName()

virtual bool ComponentInstantiationInterface::setName ( std::string const & currentName,
std::string const & newName )
finaloverridevirtual

Set a new name for the selected item.

Parameters
[in]currentNameName of the selected item.
[in]newNameNew name for the item.
Returns
True, if successful, false otherwise.

Implements NameGroupInterface.

◆ setPackageName()

bool ComponentInstantiationInterface::setPackageName ( std::string const & instantiationName,
std::string const & newPackageName )

Set a new package name for the selected component instantiation.

Parameters
[in]instantiationNameName of the selected component instantiation.
[in]newPackageNameThe new library name.
Returns
True, if successful, false otherwise.

◆ validateItems()

virtual bool ComponentInstantiationInterface::validateItems ( ) const
finaloverridevirtual

Validates the contained items.

Returns
True, if all the ports are valid, false otherwise.

Implements CommonInterface.


The documentation for this class was generated from the following file: