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

Interface for editing module parameters. More...

#include <ModuleParameterInterface.h>

Inheritance diagram for ModuleParameterInterface:
AbstractParameterInterface ParameterizableInterface NameGroupInterface CommonInterface

Public Member Functions

 ModuleParameterInterface (const ModuleParameterInterface &other)=delete
 No copying. No assignment.
 
 ModuleParameterInterface (QSharedPointer< ParameterValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, QSharedPointer< ComponentInstantiationParameterFinder > parameterFinder)
 
virtual ~ModuleParameterInterface ()=default
 
void addModuleParameter (int const &row, std::string const &newParameterName=std::string(""))
 
std::string getDataType (std::string const &parameterName) const
 
std::string getIndexedItemName (int itemIndex) const override
 
virtual int getItemIndex (std::string const &itemName) const override
 
virtual std::vector< std::string > getItemNames () const override
 
std::string getUsageType (std::string const &parameterName) const
 
virtual int itemCount () const override
 
ModuleParameterInterfaceoperator= (const ModuleParameterInterface &other)=delete
 
bool removeModuleParameter (std::string const &parameterName)
 
bool setDataType (std::string const &parameterName, std::string const &newDataType)
 
void setModuleParameters (QSharedPointer< ComponentInstantiation > instantiation)
 
bool setUsageType (std::string const &parameterName, std::string const &newUsageType)
 
- Public Member Functions inherited from AbstractParameterInterface
 AbstractParameterInterface (const AbstractParameterInterface &other)=delete
 No copying. No assignment.
 
 AbstractParameterInterface (QSharedPointer< ParameterValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter)
 
virtual ~AbstractParameterInterface ()=default
 
virtual int getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override final
 
std::string getArrayLeftExpression (std::string const &parameterName) const
 
std::string getArrayLeftFormattedExpression (std::string const &parameterName) const
 
std::string getArrayLeftValue (std::string const &parameterName, int const &baseNumber=0) const
 
std::string getArrayRightExpression (std::string const &parameterName) const
 
std::string getArrayRightFormattedExpression (std::string const &parameterName) const
 
std::string getArrayRightValue (std::string const &parameterName, int const &baseNumber=0) const
 
std::string getBitWidthLeftExpression (std::string const &parameterName) const
 
std::string getBitWidthLeftFormattedExpression (std::string const &parameterName) const
 
std::string getBitWidthLeftValue (std::string const &parameterName, int const &baseNumber=0) const
 
std::string getBitWidthRightExpression (std::string const &parameterName) const
 
std::string getBitWidthRightFormattedExpression (std::string const &parameterName) const
 
std::string getBitWidthRightValue (std::string const &parameterName, int const &baseNumber=0) const
 
std::string getChoice (std::string const &parameterName) const
 
std::string getDisplayName (std::string const &parameterName) const
 
std::vector< std::string > getExpressionsInSelectedItems (std::vector< std::string > parameterNames) const
 
std::string getID (std::string const &parameterName) const
 
std::string getMaximum (std::string const &parameterName) const
 
std::string getMinimum (std::string const &parameterName) const
 
std::string getResolve (std::string const &parameterName) const
 
std::string getType (std::string const &parameterName) const
 
int getUsageCount (std::string const &parameterName) const
 
std::string getValue (std::string const &parameterName, int const &baseNumber=0) const
 
std::string getValueExpression (std::string const &parameterName) const
 
std::string getValueFormattedExpression (std::string const &parameterName) const
 
bool hasValidArrayValues (std::string const &parameterName) const
 
bool hasValidBitWidth (std::string const &parameterName) const
 
bool hasValidChoice (std::string const &parameterName) const
 
bool hasValidMaximum (std::string const &parameterName) const
 
bool hasValidMinimum (std::string const &parameterName) const
 
bool hasValidResolve (std::string const &parameterName) const
 
bool hasValidType (std::string const &parameterName) const
 
bool hasValidValue (std::string const &parameterName) const
 
bool increaseUsageCount (std::string const &parameterName)
 
virtual bool itemHasValidName (std::string const &itemName) const override final
 
AbstractParameterInterfaceoperator= (const AbstractParameterInterface &other)=delete
 
bool reduceUsageCount (std::string const &parameterName)
 
bool setArrayLeft (std::string const &parameterName, std::string const &newArrayLeft)
 
bool setArrayRight (std::string const &parameterName, std::string const &newArrayRight)
 
bool setBitWidthLeft (std::string const &parameterName, std::string const &newBitWidthLeft)
 
bool setBitWidthRight (std::string const &parameterName, std::string const &newBitWidthRight)
 
bool setChoice (std::string const &parameterName, std::string const &newChoice)
 
void setChoices (QSharedPointer< QList< QSharedPointer< Choice > > > newChoices)
 
bool setDisplayName (std::string const &parameterName, std::string const &newDisplayName)
 
bool setID (std::string const &parameterName, std::string const &newID)
 
bool setMaximum (std::string const &parameterName, std::string const &newMaximum)
 
bool setMinimum (std::string const &parameterName, std::string const &newMinimum)
 
virtual bool setName (std::string const &currentName, std::string const &newName) override final
 
bool setResolve (std::string const &parameterName, std::string const &newResolve)
 
bool setType (std::string const &parameterName, std::string const &newType)
 
bool setUsageCount (std::string const &parameterName, int const &newUsageCount)
 
bool setValue (std::string const &parameterName, std::string const &newValue)
 
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 module parameters.

Definition at line 26 of file ModuleParameterInterface.h.

Constructor & Destructor Documentation

◆ ModuleParameterInterface() [1/2]

ModuleParameterInterface::ModuleParameterInterface ( QSharedPointer< ParameterValidator > validator,
QSharedPointer< ExpressionParser > expressionParser,
QSharedPointer< ExpressionFormatter > expressionFormatter,
QSharedPointer< ComponentInstantiationParameterFinder > parameterFinder )

The constructor.

Parameters
[ni]validator Validator for parameters.
[ni]expressionParser Parser for expressions.
[ni]expressionFormatter Formatter for expressions.
[ni]parameterFinder Parameter finder for component instantiation parameters.

◆ ~ModuleParameterInterface()

virtual ModuleParameterInterface::~ModuleParameterInterface ( )
virtualdefault

The destructor.

◆ ModuleParameterInterface() [2/2]

ModuleParameterInterface::ModuleParameterInterface ( const ModuleParameterInterface & other)
delete

No copying. No assignment.

Member Function Documentation

◆ addModuleParameter()

void ModuleParameterInterface::addModuleParameter ( int const & row,
std::string const & newParameterName = std::string("") )

Add a new module parameter.

Parameters
[in]rowIndex of the new parameter.
[in]newParameterNameNew of the new parameter.

◆ getDataType()

std::string ModuleParameterInterface::getDataType ( std::string const & parameterName) const

Get the data type of the selected module parameter.

Parameters
[in]parameterNameName of the selected module parameter.
Returns
Data type of the selected module parameter.

◆ getIndexedItemName()

std::string ModuleParameterInterface::getIndexedItemName ( int itemIndex) const
overridevirtual

Get name of the indexed item.

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

Implements NameGroupInterface.

◆ getItemIndex()

virtual int ModuleParameterInterface::getItemIndex ( std::string const & itemName) const
overridevirtual

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 > ModuleParameterInterface::getItemNames ( ) const
overridevirtual

Get the names of the available items.

Returns
Names of the available items.

Implements CommonInterface.

◆ getUsageType()

std::string ModuleParameterInterface::getUsageType ( std::string const & parameterName) const

Get the usage type of the selected module parameter.

Parameters
[in]parameterNameName of the selected module parameter.
Returns
Usage type of the selected module parameter.

◆ itemCount()

virtual int ModuleParameterInterface::itemCount ( ) const
overridevirtual

Get the number of available items.

Returns
Number of available items.

Implements CommonInterface.

◆ operator=()

ModuleParameterInterface & ModuleParameterInterface::operator= ( const ModuleParameterInterface & other)
delete

◆ removeModuleParameter()

bool ModuleParameterInterface::removeModuleParameter ( std::string const & parameterName)

Remove the selected module parameter.

Parameters
[in]parameterNameNew of the selected parameter.
Returns
True, if successful, false otherwise.

◆ setDataType()

bool ModuleParameterInterface::setDataType ( std::string const & parameterName,
std::string const & newDataType )

Set a new data type for the selected module parameter.

Parameters
[in]parameterNameName of the selected module parameter.
[in]newDataTypeNew data type.
Returns
True, if successful, false otherwise.

◆ setModuleParameters()

void ModuleParameterInterface::setModuleParameters ( QSharedPointer< ComponentInstantiation > instantiation)

Set available module parameters.

Parameters
[in]instantiationComponent instantiation containing the new module parameters.

◆ setUsageType()

bool ModuleParameterInterface::setUsageType ( std::string const & parameterName,
std::string const & newUsageType )

Set a new usage type for the selected module parameter.

Parameters
[in]parameterNameName of the selected module parameter.
[in]newUsageTypeNew usage type.
Returns
True, if successful, false otherwise.

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