|
Kactus2
Kactus2 reference guide
|
Interface for editing parameters. More...
#include <AbstractParameterInterface.h>
Public Member Functions | |
| 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 ¶meterName) const |
| std::string | getArrayLeftFormattedExpression (std::string const ¶meterName) const |
| std::string | getArrayLeftValue (std::string const ¶meterName, int const &baseNumber=0) const |
| std::string | getArrayRightExpression (std::string const ¶meterName) const |
| std::string | getArrayRightFormattedExpression (std::string const ¶meterName) const |
| std::string | getArrayRightValue (std::string const ¶meterName, int const &baseNumber=0) const |
| std::string | getBitWidthLeftExpression (std::string const ¶meterName) const |
| std::string | getBitWidthLeftFormattedExpression (std::string const ¶meterName) const |
| std::string | getBitWidthLeftValue (std::string const ¶meterName, int const &baseNumber=0) const |
| std::string | getBitWidthRightExpression (std::string const ¶meterName) const |
| std::string | getBitWidthRightFormattedExpression (std::string const ¶meterName) const |
| std::string | getBitWidthRightValue (std::string const ¶meterName, int const &baseNumber=0) const |
| std::string | getChoice (std::string const ¶meterName) const |
| std::string | getDisplayName (std::string const ¶meterName) const |
| std::vector< std::string > | getExpressionsInSelectedItems (std::vector< std::string > parameterNames) const |
| std::string | getID (std::string const ¶meterName) const |
| std::string | getMaximum (std::string const ¶meterName) const |
| std::string | getMinimum (std::string const ¶meterName) const |
| std::string | getResolve (std::string const ¶meterName) const |
| std::string | getType (std::string const ¶meterName) const |
| int | getUsageCount (std::string const ¶meterName) const |
| std::string | getValue (std::string const ¶meterName, int const &baseNumber=0) const |
| std::string | getValueExpression (std::string const ¶meterName) const |
| std::string | getValueFormattedExpression (std::string const ¶meterName) const |
| bool | hasValidArrayValues (std::string const ¶meterName) const |
| bool | hasValidBitWidth (std::string const ¶meterName) const |
| bool | hasValidChoice (std::string const ¶meterName) const |
| bool | hasValidMaximum (std::string const ¶meterName) const |
| bool | hasValidMinimum (std::string const ¶meterName) const |
| bool | hasValidResolve (std::string const ¶meterName) const |
| bool | hasValidType (std::string const ¶meterName) const |
| bool | hasValidValue (std::string const ¶meterName) const |
| bool | increaseUsageCount (std::string const ¶meterName) |
| virtual bool | itemHasValidName (std::string const &itemName) const override final |
| AbstractParameterInterface & | operator= (const AbstractParameterInterface &other)=delete |
| bool | reduceUsageCount (std::string const ¶meterName) |
| bool | setArrayLeft (std::string const ¶meterName, std::string const &newArrayLeft) |
| bool | setArrayRight (std::string const ¶meterName, std::string const &newArrayRight) |
| bool | setBitWidthLeft (std::string const ¶meterName, std::string const &newBitWidthLeft) |
| bool | setBitWidthRight (std::string const ¶meterName, std::string const &newBitWidthRight) |
| bool | setChoice (std::string const ¶meterName, std::string const &newChoice) |
| void | setChoices (QSharedPointer< QList< QSharedPointer< Choice > > > newChoices) |
| bool | setDisplayName (std::string const ¶meterName, std::string const &newDisplayName) |
| bool | setID (std::string const ¶meterName, std::string const &newID) |
| bool | setMaximum (std::string const ¶meterName, std::string const &newMaximum) |
| bool | setMinimum (std::string const ¶meterName, std::string const &newMinimum) |
| virtual bool | setName (std::string const ¤tName, std::string const &newName) override final |
| bool | setResolve (std::string const ¶meterName, std::string const &newResolve) |
| bool | setType (std::string const ¶meterName, std::string const &newType) |
| bool | setUsageCount (std::string const ¶meterName, int const &newUsageCount) |
| bool | setValue (std::string const ¶meterName, 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 |
| ParameterizableInterface & | operator= (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 | getIndexedItemName (int itemIndex) const =0 |
| virtual int | getItemIndex (std::string const &itemName) const =0 |
| virtual std::string | getShortDescription (std::string const &itemName) const |
| NameGroupInterface & | operator= (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 |
| virtual std::vector< std::string > | getItemNames () const =0 |
| virtual int | itemCount () const =0 |
| CommonInterface & | operator= (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 |
Interface for editing parameters.
Definition at line 28 of file AbstractParameterInterface.h.
| AbstractParameterInterface::AbstractParameterInterface | ( | QSharedPointer< ParameterValidator > | validator, |
| QSharedPointer< ExpressionParser > | expressionParser, | ||
| QSharedPointer< ExpressionFormatter > | expressionFormatter ) |
The constructor.
| [in] | validator | Validator for parameters. |
| [in] | expressionParser | Parser for expressions. |
| [in] | expressionFormatter | Formatter for expressions. |
|
virtualdefault |
The destructor.
|
delete |
No copying. No assignment.
|
finaloverridevirtual |
Calculate all the references to the selected ID in the selected item.
| [in] | itemName | Name of the selected item. |
| [in] | valueID | The selected ID. |
Implements ParameterizableInterface.
| std::string AbstractParameterInterface::getArrayLeftExpression | ( | std::string const & | parameterName | ) | const |
Get the array left expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getArrayLeftFormattedExpression | ( | std::string const & | parameterName | ) | const |
Get the formatted array left expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getArrayLeftValue | ( | std::string const & | parameterName, |
| int const & | baseNumber = 0 ) const |
Get the calculated array left value of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | baseNumber | Base for displaying the value. |
| std::string AbstractParameterInterface::getArrayRightExpression | ( | std::string const & | parameterName | ) | const |
Get the array right expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getArrayRightFormattedExpression | ( | std::string const & | parameterName | ) | const |
Get the formatted array right expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getArrayRightValue | ( | std::string const & | parameterName, |
| int const & | baseNumber = 0 ) const |
Get the calculated array right value of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | baseNumber | Base for displaying the value. |
| std::string AbstractParameterInterface::getBitWidthLeftExpression | ( | std::string const & | parameterName | ) | const |
Get the bit width left expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getBitWidthLeftFormattedExpression | ( | std::string const & | parameterName | ) | const |
Get the formatted bit width left expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getBitWidthLeftValue | ( | std::string const & | parameterName, |
| int const & | baseNumber = 0 ) const |
Get the calculated bit width left value of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | baseNumber | Base for displaying the value. |
| std::string AbstractParameterInterface::getBitWidthRightExpression | ( | std::string const & | parameterName | ) | const |
Get the bit width right expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getBitWidthRightFormattedExpression | ( | std::string const & | parameterName | ) | const |
Get the formatted bit width right expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getBitWidthRightValue | ( | std::string const & | parameterName, |
| int const & | baseNumber = 0 ) const |
Get the calculated bit width right value of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | baseNumber | Base for displaying the value. |
| std::string AbstractParameterInterface::getChoice | ( | std::string const & | parameterName | ) | const |
Get the choice reference of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
|
virtual |
Get the display name of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
Reimplemented from NameGroupInterface.
| std::vector< std::string > AbstractParameterInterface::getExpressionsInSelectedItems | ( | std::vector< std::string > | parameterNames | ) | const |
Get the expressions in the selected parameters.
| [in] | parameterNames | Names of the selected parameters. |
| std::string AbstractParameterInterface::getID | ( | std::string const & | parameterName | ) | const |
Get the ID of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getMaximum | ( | std::string const & | parameterName | ) | const |
Get the maximum value the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getMinimum | ( | std::string const & | parameterName | ) | const |
Get the minimum value the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getResolve | ( | std::string const & | parameterName | ) | const |
Get the resolve of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getType | ( | std::string const & | parameterName | ) | const |
Get the type of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| int AbstractParameterInterface::getUsageCount | ( | std::string const & | parameterName | ) | const |
Get the usage count of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getValue | ( | std::string const & | parameterName, |
| int const & | baseNumber = 0 ) const |
Get the calculated value of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | baseNumber | Base for displaying the value. |
| std::string AbstractParameterInterface::getValueExpression | ( | std::string const & | parameterName | ) | const |
Get the value expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| std::string AbstractParameterInterface::getValueFormattedExpression | ( | std::string const & | parameterName | ) | const |
Get the formatted value expression of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| bool AbstractParameterInterface::hasValidArrayValues | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has valid array values.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidBitWidth | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid bit width.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidChoice | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid choice.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidMaximum | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid maximum.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidMinimum | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid minimum.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidResolve | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid resolve.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidType | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid type.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::hasValidValue | ( | std::string const & | parameterName | ) | const |
Check if the selected parameter has a valid value.
| [in] | parameterName | New of the selected parameter. |
| bool AbstractParameterInterface::increaseUsageCount | ( | std::string const & | parameterName | ) |
Increase the usage count of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
|
finaloverridevirtual |
Check if the selected item has a valid name.
| [in] | itemName | Name of the selected item. |
Implements NameGroupInterface.
|
delete |
| bool AbstractParameterInterface::reduceUsageCount | ( | std::string const & | parameterName | ) |
Decrease the usage count of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| bool AbstractParameterInterface::setArrayLeft | ( | std::string const & | parameterName, |
| std::string const & | newArrayLeft ) |
Set a new array left value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newArrayLeft | New array left value. |
| bool AbstractParameterInterface::setArrayRight | ( | std::string const & | parameterName, |
| std::string const & | newArrayRight ) |
Set a new array right value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newArrayRight | New array right value. |
| bool AbstractParameterInterface::setBitWidthLeft | ( | std::string const & | parameterName, |
| std::string const & | newBitWidthLeft ) |
Set a new bit width left value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newBitWidthLeft | New bit width left value. |
| bool AbstractParameterInterface::setBitWidthRight | ( | std::string const & | parameterName, |
| std::string const & | newBitWidthRight ) |
Set a new bit width right value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newBitWidthRight | New bit width right value. |
| bool AbstractParameterInterface::setChoice | ( | std::string const & | parameterName, |
| std::string const & | newChoice ) |
Set the choice reference for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newChoice | The new choice reference. |
| void AbstractParameterInterface::setChoices | ( | QSharedPointer< QList< QSharedPointer< Choice > > > | newChoices | ) |
Set available choices.
| [in] | newChoices | The new choices. |
| bool AbstractParameterInterface::setDisplayName | ( | std::string const & | parameterName, |
| std::string const & | newDisplayName ) |
Set the display name of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newDisplayName | New display name for the parameter. |
| bool AbstractParameterInterface::setID | ( | std::string const & | parameterName, |
| std::string const & | newID ) |
Set a new ID for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newID | New ID. |
| bool AbstractParameterInterface::setMaximum | ( | std::string const & | parameterName, |
| std::string const & | newMaximum ) |
Set the maximum value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newMaximum | New maximum value of the parameter. |
| bool AbstractParameterInterface::setMinimum | ( | std::string const & | parameterName, |
| std::string const & | newMinimum ) |
Set the minimum value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newMinimum | New minimum value of the parameter. |
|
finaloverridevirtual |
Set a new name for the selected item.
| [in] | currentName | Name of the selected item. |
| [in] | newName | New name for the item. |
Implements NameGroupInterface.
| bool AbstractParameterInterface::setResolve | ( | std::string const & | parameterName, |
| std::string const & | newResolve ) |
Set a resolve for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newResolve | New resolve. |
| bool AbstractParameterInterface::setType | ( | std::string const & | parameterName, |
| std::string const & | newType ) |
Set the type of the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newType | New type for the parameter. |
| bool AbstractParameterInterface::setUsageCount | ( | std::string const & | parameterName, |
| int const & | newUsageCount ) |
Set a new usage count for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newUsageCount | New usage count. |
| bool AbstractParameterInterface::setValue | ( | std::string const & | parameterName, |
| std::string const & | newValue ) |
Set a new value for the selected parameter.
| [in] | parameterName | Name of the selected parameter. |
| [in] | newValue | New value. |
|
finaloverridevirtual |
Validates the contained items.
Implements CommonInterface.