![]() |
Kactus2
Kactus2 reference guide
|
Interface for editing port maps. More...
#include <PortMapInterface.h>
Public Member Functions | |
PortMapInterface (QSharedPointer< PortMapValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, PortsInterface *physicalPortInterface, PortAbstractionInterface *logicalPortInterface) | |
virtual | ~PortMapInterface ()=default |
void | addPortMap (int const &row) |
bool | connectedPortsHaveSameRange (int const &portMapIndex) const |
bool | connectedPortsHaveValidDirections (int const &portMapIndex) const |
bool | connectedPortsHaveValidInitiatives (int const &portMapIndex) const |
bool | connectedPortsHaveValidPortTypes (int const &portMapIndex) const |
bool | connectPorts (std::string const &logicalPortName, std::string const &physicalPortName) |
void | createAllSignals () |
void | createOptionalSignals () |
void | createRequiredSignals () |
virtual int | getAllReferencesToIdInItem (const std::string &itemName, std::string const &valueID) const override final |
std::vector< std::string > | getExpressionsInSelectedPortMap (int const &portMapIndex) const |
virtual std::string | getIndexedItemName (int const &itemIndex) const |
General::InterfaceMode | getInterfaceMode () const |
bool | getInvertBool (int const &portMapIndex) const |
std::string | getInvertString (int const &portMapIndex) const |
BooleanValue | getInvertValue (int const &portMapIndex) const |
std::string | getIsInformativeString (int const &portMapIndex) const |
bool | getIsInformativeValue (int const &portMapIndex) const |
virtual std::vector< std::string > | getItemNames () const override final |
std::string | getLogicalLeftBoundExpression (int const &portMapIndex) const |
std::string | getLogicalLeftBoundFormattedExpression (int const &portMapIndex) const |
std::string | getLogicalLeftBoundValue (int const &portMapIndex, int const &baseNumber=0) const |
std::string | getLogicalPortIconPath (int const &portMapIndex) const |
PortAbstractionInterface * | getLogicalPortInterface () const |
std::string | getLogicalPortName (int const &portMapIndex) const |
std::string | getLogicalPresence (int const &portMapIndex) |
std::string | getLogicalPresenceWithLogicalPort (std::string const &logicalName) |
std::string | getLogicalRightBoundExpression (int const &portMapIndex) const |
std::string | getLogicalRightBoundFormattedExpression (int const &portMapIndex) const |
std::string | getLogicalRightBoundValue (int const &portMapIndex, int const &baseNumber=0) const |
std::string | getLogicalTieOffExpression (int const &portMapIndex) const |
std::string | getLogicalTieOffFormattedExpression (int const &portMapIndex) const |
std::string | getLogicalTieOffValue (int const &portMapIndex, int const &baseNumber=0) const |
std::string | getPhysicalLeftBoundExpression (int const &portMapIndex) const |
std::string | getPhysicalLeftBoundFormattedExpression (int const &portMapIndex) const |
std::string | getPhysicalLeftBoundValue (int const &portMapIndex, int const &baseNumber=0) const |
std::string | getPhysicalPortIconPath (int const &portMapIndex) const |
PortsInterface * | getPhysicalPortInterface () const |
std::string | getPhysicalPortName (int const &portMapIndex) const |
std::string | getPhysicalRightBoundExpression (int const &portMapIndex) const |
std::string | getPhysicalRightBoundFormattedExpression (int const &portMapIndex) const |
std::string | getPhysicalRightBoundValue (int const &portMapIndex, int const &baseNumber=0) const |
PortMap * | getPortMapPointer (int const &portMapIndex) const |
std::string | getSystemGroup () const |
bool | hasPhysicalPort (int const &portMapIndex) const |
virtual int | itemCount () const override final |
bool | logicalPortExists (int const &portMapIndex) const |
bool | logicalPortHasValidRange (int const &portMapIndex) const |
bool | logicalPortIsValid (int const &portMapIndex) const |
bool | physicalMappingIsValid (int const &portMapIndex) const |
bool | physicalPortIsValid (int const &portMapIndex) const |
std::vector< std::string > | removeAllPortMapsFromLogicalPort (std::string const &logicalPortName) |
bool | removePortMap (int const &portMapIndex) |
bool | setInvertValue (int const &portMapIndex, bool newInvertValue) const |
bool | setIsInformativeValue (int const &portMapIndex, bool newIsInformativeValue) const |
bool | setLogicalLeftBound (int const &portMapIndex, std::string const &newLogicalLeft) |
bool | setLogicalPort (int const &portMapIndex, std::string const &newName) |
bool | setLogicalRightBound (int const &portMapIndex, std::string const &newLogicalRight) |
bool | setLogicalTieOff (int const &portMapIndex, std::string const &newTieOff) |
bool | setPhysicalLeftBound (int const &portMapIndex, std::string const &newPhysicalLeft) |
bool | setPhysicalPort (int const &portMapIndex, std::string const &newPhysicalName) |
bool | setPhysicalRightBound (int const &portMapIndex, std::string const &newPhysicalRight) |
void | setupAbstractionDefinition (QSharedPointer< AbstractionDefinition const > absDef) |
void | setupBusMode (General::InterfaceMode busMode) |
void | setupPhysicalPorts (Port::List ports) |
virtual void | setupPortMaps (QSharedPointer< AbstractionType > abstractionType) |
void | setupSystemGroup (QString const &systemGroup) |
bool | tieOffIsValid (int const &portMapIndex) const |
virtual bool | validateItems () const override final |
![]() | |
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 |
![]() | |
CommonInterface ()=default | |
CommonInterface (const CommonInterface &other)=delete | |
No copying. No assignment. | |
virtual | ~CommonInterface ()=default |
CommonInterface & | operator= (const CommonInterface &other)=delete |
Additional Inherited Members | |
![]() | |
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 |
![]() | |
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 port maps.
Definition at line 37 of file PortMapInterface.h.
PortMapInterface::PortMapInterface | ( | QSharedPointer< PortMapValidator > | validator, |
QSharedPointer< ExpressionParser > | expressionParser, | ||
QSharedPointer< ExpressionFormatter > | expressionFormatter, | ||
PortsInterface * | physicalPortInterface, | ||
PortAbstractionInterface * | logicalPortInterface ) |
The constructor.
[in] | validator | Validator for address blocks. |
[in] | expressionParser | Parser for expressions. |
[in] | expressionFormatter | Formatter for expressions. |
[in] | physicalPortInterface | Interface for accessing physical ports. |
[in] | logicalPortInterface | Interface for accessing logical ports. |
|
virtualdefault |
The destructor.
void PortMapInterface::addPortMap | ( | int const & | row | ) |
Add a new port map.
[in] | row | Row of the new port map. |
bool PortMapInterface::connectedPortsHaveSameRange | ( | int const & | portMapIndex | ) | const |
Check if the connected ports of the selected port map have the same range.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::connectedPortsHaveValidDirections | ( | int const & | portMapIndex | ) | const |
Check if the connected ports of the selected port map have valid directions.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::connectedPortsHaveValidInitiatives | ( | int const & | portMapIndex | ) | const |
Check if the connected ports of the selected port map have valid initiatives.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::connectedPortsHaveValidPortTypes | ( | int const & | portMapIndex | ) | const |
Check if the mapped ports have valid port types.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::connectPorts | ( | std::string const & | logicalPortName, |
std::string const & | physicalPortName ) |
Connect the selected logical port to the selected physical port.
[in] | logicalPortName | Name of the selected logical port. |
[in] | physicalPortName | Name of the selected physical port. |
void PortMapInterface::createAllSignals | ( | ) |
Create port maps from all signals.
void PortMapInterface::createOptionalSignals | ( | ) |
Create port maps from signals with optional presence.
void PortMapInterface::createRequiredSignals | ( | ) |
Create port maps from signals with required presence.
|
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::vector< std::string > PortMapInterface::getExpressionsInSelectedPortMap | ( | int const & | portMapIndex | ) | const |
Get the expressions in the selected port map.
[in] | portMapIndex | Index of the selected port map. |
|
virtual |
Get name of the indexed logical port.
[in] | itemIndex | Index of the selected logical port. |
General::InterfaceMode PortMapInterface::getInterfaceMode | ( | ) | const |
Get the currently active bus interface mode.
bool PortMapInterface::getInvertBool | ( | int const & | portMapIndex | ) | const |
Get the invert value of the logical port of the selected port map.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getInvertString | ( | int const & | portMapIndex | ) | const |
Get the invert value of the logical port of the selected port map in string form.
[in] | portMapIndex | Index of the selected port map. |
BooleanValue PortMapInterface::getInvertValue | ( | int const & | portMapIndex | ) | const |
Get the invert value of the logical port of the selected port map.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getIsInformativeString | ( | int const & | portMapIndex | ) | const |
Get the is informative value of the selected port map in string form.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::getIsInformativeValue | ( | int const & | portMapIndex | ) | const |
Get the is informative value of the selected port map.
[in] | portMapIndex | Index of the selected port map. |
|
finaloverridevirtual |
Get the names of the available logical ports.
Implements CommonInterface.
std::string PortMapInterface::getLogicalLeftBoundExpression | ( | int const & | portMapIndex | ) | const |
Get the logical left bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalLeftBoundFormattedExpression | ( | int const & | portMapIndex | ) | const |
Get the formatted logical left bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalLeftBoundValue | ( | int const & | portMapIndex, |
int const & | baseNumber = 0 ) const |
Get the calculated logical left bound of the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | baseNumber | Base for displaying the value. |
std::string PortMapInterface::getLogicalPortIconPath | ( | int const & | portMapIndex | ) | const |
Get the icon path for the logical port of the selected port map.
[in] | portMapIndex | Index of the selected port map. |
PortAbstractionInterface * PortMapInterface::getLogicalPortInterface | ( | ) | const |
Get the interface for accessing logical ports.
std::string PortMapInterface::getLogicalPortName | ( | int const & | portMapIndex | ) | const |
Get the logical port name modified by the port map index.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalPresence | ( | int const & | portMapIndex | ) |
Get the logical presence of the logical port in the selected port map.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalPresenceWithLogicalPort | ( | std::string const & | logicalName | ) |
Get the logical presence of the selected logical port.
[in] | logicalPortName | Name of the selected logical port. |
std::string PortMapInterface::getLogicalRightBoundExpression | ( | int const & | portMapIndex | ) | const |
Get the logical right bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalRightBoundFormattedExpression | ( | int const & | portMapIndex | ) | const |
Get the formatted logical right bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalRightBoundValue | ( | int const & | portMapIndex, |
int const & | baseNumber = 0 ) const |
Get the calculated logical right bound of the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | baseNumber | Base for displaying the value. |
std::string PortMapInterface::getLogicalTieOffExpression | ( | int const & | portMapIndex | ) | const |
Get the logical tie off expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalTieOffFormattedExpression | ( | int const & | portMapIndex | ) | const |
Get the formatted logical tie off expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getLogicalTieOffValue | ( | int const & | portMapIndex, |
int const & | baseNumber = 0 ) const |
Get the calculated logical tie off of the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | baseNumber | Base for displaying the value. |
std::string PortMapInterface::getPhysicalLeftBoundExpression | ( | int const & | portMapIndex | ) | const |
Get the physical left bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getPhysicalLeftBoundFormattedExpression | ( | int const & | portMapIndex | ) | const |
Get the formatted physical left bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getPhysicalLeftBoundValue | ( | int const & | portMapIndex, |
int const & | baseNumber = 0 ) const |
Get the calculated physical left bound of the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | baseNumber | Base for displaying the value. |
std::string PortMapInterface::getPhysicalPortIconPath | ( | int const & | portMapIndex | ) | const |
Get the icon path for the physical port of the selected port map.
[in] | portMapIndex | Index of the selected port map. |
PortsInterface * PortMapInterface::getPhysicalPortInterface | ( | ) | const |
Get the interface for accessing physical ports.
std::string PortMapInterface::getPhysicalPortName | ( | int const & | portMapIndex | ) | const |
Get the name of the connected physical port in the selected port map.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getPhysicalRightBoundExpression | ( | int const & | portMapIndex | ) | const |
Get the physical right bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getPhysicalRightBoundFormattedExpression | ( | int const & | portMapIndex | ) | const |
Get the formatted physical right bound expression of the selected item.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getPhysicalRightBoundValue | ( | int const & | portMapIndex, |
int const & | baseNumber = 0 ) const |
Get the calculated physical right bound of the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | baseNumber | Base for displaying the value. |
PortMap * PortMapInterface::getPortMapPointer | ( | int const & | portMapIndex | ) | const |
Get a pointer to the selected port map.
[in] | portMapIndex | Index of the selected port map. |
std::string PortMapInterface::getSystemGroup | ( | ) | const |
Get the currently active system group.
bool PortMapInterface::hasPhysicalPort | ( | int const & | portMapIndex | ) | const |
Check if the selected port map has a connected physical port.
[in] | portMapIndex | Index of the selected port map. |
|
finaloverridevirtual |
Get the number of available port maps.
Implements CommonInterface.
bool PortMapInterface::logicalPortExists | ( | int const & | portMapIndex | ) | const |
Check if the logical port of the selected port map exists.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::logicalPortHasValidRange | ( | int const & | portMapIndex | ) | const |
Checks if the logical port of the selected port map has a valid range.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::logicalPortIsValid | ( | int const & | portMapIndex | ) | const |
Check if the logical port of the selected port map is valid.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::physicalMappingIsValid | ( | int const & | portMapIndex | ) | const |
Check if the physical mapping of the selected port map is valid
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::physicalPortIsValid | ( | int const & | portMapIndex | ) | const |
Check if the physical port of the selected port map is valid
[in] | portMapIndex | Index of the selected port map. |
std::vector< std::string > PortMapInterface::removeAllPortMapsFromLogicalPort | ( | std::string const & | logicalPortName | ) |
Remove all the port maps from the selected logical port.
[in] | logicalPortName | Name of the selected logical port. |
bool PortMapInterface::removePortMap | ( | int const & | portMapIndex | ) |
Remove the selected port map.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::setInvertValue | ( | int const & | portMapIndex, |
bool | newInvertValue ) const |
Set a new invert value for the selected logical port.
[in] | portMapIndex | Index of the selected port map. |
[in] | newInvertValue | The new invert value. |
bool PortMapInterface::setIsInformativeValue | ( | int const & | portMapIndex, |
bool | newIsInformativeValue ) const |
Set a new is informative value for the selected port map.
[in] | portMapIndex | Index of the selected port map. |
bool PortMapInterface::setLogicalLeftBound | ( | int const & | portMapIndex, |
std::string const & | newLogicalLeft ) |
Set a new logical left value for the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | newLogicalLeft | New logical left value. |
bool PortMapInterface::setLogicalPort | ( | int const & | portMapIndex, |
std::string const & | newName ) |
Set a new name for the selected logical port.
[in] | portMapIndex | Index of the selected port map. |
[in] | newName | New name for the item. |
bool PortMapInterface::setLogicalRightBound | ( | int const & | portMapIndex, |
std::string const & | newLogicalRight ) |
Set a new logical right value for the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | newLogicalRight | New logical right value. |
bool PortMapInterface::setLogicalTieOff | ( | int const & | portMapIndex, |
std::string const & | newTieOff ) |
Set a new logical tie off value for the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | newTieOff | New logical tie off value. |
bool PortMapInterface::setPhysicalLeftBound | ( | int const & | portMapIndex, |
std::string const & | newPhysicalLeft ) |
Set a new physical left bound value for the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | newPhysicalLeft | New physical left value. |
bool PortMapInterface::setPhysicalPort | ( | int const & | portMapIndex, |
std::string const & | newPhysicalName ) |
Set a new name for the connected physical port in the selected port map.
[in] | portMapIndex | Index of the selected port map. |
[in] | newPhysicalName | New name for the physical port. |
bool PortMapInterface::setPhysicalRightBound | ( | int const & | portMapIndex, |
std::string const & | newPhysicalRight ) |
Set a new physical right bound value for the selected item.
[in] | portMapIndex | Index of the selected port map. |
[in] | newPhysicalRight | New physical right value. |
void PortMapInterface::setupAbstractionDefinition | ( | QSharedPointer< AbstractionDefinition const > | absDef | ) |
Setup the abstraction definition.
[in] | absDef | The new abstraction definition. |
void PortMapInterface::setupBusMode | ( | General::InterfaceMode | busMode | ) |
Setup the bus interface mode.
[in] | busMode | The new bus interface mode. |
void PortMapInterface::setupPhysicalPorts | ( | Port::List | ports | ) |
Setup the available physical ports.
[in] | component | Component containing the selected ports. |
|
virtual |
Setup the available port maps.
[in] | abstractionType | Abstraction type containing the available port maps. |
void PortMapInterface::setupSystemGroup | ( | QString const & | systemGroup | ) |
Setup the system group.
[in] | systemGroup | The new system group. |
bool PortMapInterface::tieOffIsValid | ( | int const & | portMapIndex | ) | const |
Check if the tie off value of the selected port map is valid.
[in] | portMapIndex | Index of the selected port map. |
|
finaloverridevirtual |
Validates the contained items.
Implements CommonInterface.