Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ParameterizableInterface Class Referenceabstract

Interface for parameterizable items. More...

#include <ParameterizableInterface.h>

Inheritance diagram for ParameterizableInterface:
AbstractParameterInterface BusInterfaceInterface ComponentInstantiationInterface FieldInterface FileBuilderInterface FileInterface FileSetInterface MemoryBlockInterface MemoryMapInterface PortAbstractionInterface PortMapInterface PortsInterface RegisterInterface ResetInterface TransparentBridgeInterface

Public Member Functions

 ParameterizableInterface (const ParameterizableInterface &other)=delete
 No copying. No assignment.
 
 ParameterizableInterface (QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter)
 
virtual ~ParameterizableInterface ()=default
 
virtual int getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const =0
 
ParameterizableInterfaceoperator= (const ParameterizableInterface &other)=delete
 

Protected Member Functions

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
 

Detailed Description

Interface for parameterizable items.

Definition at line 26 of file ParameterizableInterface.h.

Constructor & Destructor Documentation

◆ ParameterizableInterface() [1/2]

ParameterizableInterface::ParameterizableInterface ( QSharedPointer< ExpressionParser > expressionParser,
QSharedPointer< ExpressionFormatter > expressionFormatter )

The constructor.

Parameters
[in]expressionParserParser for expressions.
[in]expressionFormatterFormatter for expressions.

◆ ~ParameterizableInterface()

virtual ParameterizableInterface::~ParameterizableInterface ( )
virtualdefault

The destructor.

◆ ParameterizableInterface() [2/2]

ParameterizableInterface::ParameterizableInterface ( const ParameterizableInterface & other)
delete

No copying. No assignment.

Member Function Documentation

◆ formattedValueFor()

QString ParameterizableInterface::formattedValueFor ( QString const & expression) const
protected

Get the formatted value for the given expression.

Parameters
[in]expressionThe selected expression.
Returns
The formatted expression.

◆ getAllReferencesToIdInItem()

virtual int ParameterizableInterface::getAllReferencesToIdInItem ( const std::string & itemName,
std::string const & valueID ) const
pure virtual

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.

Implemented in AbstractParameterInterface, AddressBlockInterface, BusInterfaceInterface, ComponentInstantiationInterface, FieldInterface, FileBuilderInterface, FileInterface, FileSetInterface, MemoryBlockInterface, MemoryMapInterface, PortMapInterface, PortsInterface, RegisterInterface, ResetInterface, and TransparentBridgeInterface.

◆ operator=()

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

◆ parseExpressionToBaseNumber()

QString ParameterizableInterface::parseExpressionToBaseNumber ( QString const & expression,
unsigned int const & baseNumber,
bool * expressionIsValid = nullptr ) const
protected

Parse the selected expression to the selected base number.

Parameters
[in]expressionThe selected expression.
[in]baseNumberThe selected base number.
Returns
The value of the expression in the base number form.

◆ parseExpressionToDecimal()

QString ParameterizableInterface::parseExpressionToDecimal ( QString const & expression,
bool * expressionIsValid = nullptr ) const
protected

Parse the selected expression to decimal.

Parameters
[in]expressionThe selected expression.
Returns
The value of the expression in decimal form.

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