12#ifndef PORTMAPINTERFACE_H
13#define PORTMAPINTERFACE_H
18#include <IPXACTmodels/common/PresenceTypes.h>
19#include <IPXACTmodels/Component/PortMap.h>
20#include <IPXACTmodels/Component/Port.h>
21#include <IPXACTmodels/generaldeclarations.h>
23#include "KactusAPI/KactusAPIGlobal.h"
26class PortMapValidator;
28class AbstractionDefinition;
52 QSharedPointer<ExpressionParser> expressionParser,
53 QSharedPointer<ExpressionFormatter> expressionFormatter,
81 virtual void setupPortMaps(QSharedPointer<AbstractionType> abstractionType);
582 bool connectPorts(std::
string const& logicalPortName, std::
string const& physicalPortName);
670 QSharedPointer<PortMap> getUnconnectedPortMap(std::
string const& logicalPortName) const;
679 QSharedPointer<PortMap> getPortMap(
int const& portMapIndex) const;
688 bool removeEmptyLogicalPort(QSharedPointer<PortMap> editedPortMap);
695 bool removeEmptyRange(QSharedPointer<PortMap::LogicalPort> editedPortLogical);
704 bool removeEmptyPhysicalPort(QSharedPointer<PortMap> editedPortMap);
713 bool removeEmptyPhysicalPartSelect(QSharedPointer<PortMap::PhysicalPort> physicalPort);
722 QSharedPointer<PartSelect> getPhysicalPartSelect(
int const& portMapIndex);
729 void createPortMapsWithPresence(
int presence);
738 bool portMapExistsForLogicalSignal(std::
string const& signalName) const;
745 QSharedPointer<QList<QSharedPointer<PortMap> > > portMaps_{
nullptr };
748 General::InterfaceMode interfaceMode_;
751 std::string systemGroup_;
754 QSharedPointer<AbstractionDefinition const> abstractionDef_{
nullptr };
757 QSharedPointer<PortMapValidator> validator_{
nullptr };
760 PortsInterface* physicalPortInterface_{
nullptr };
763 PortAbstractionInterface* logicalPortInterface_{
nullptr };
CommonInterface()=default
ParameterizableInterface(QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter)
Interface for editing abstraction definition port abstractions.
bool tieOffIsValid(int const &portMapIndex) const
bool logicalPortExists(int const &portMapIndex) const
std::string getPhysicalLeftBoundExpression(int const &portMapIndex) const
PortAbstractionInterface * getLogicalPortInterface() const
PortsInterface * getPhysicalPortInterface() const
bool setLogicalPort(int const &portMapIndex, std::string const &newName)
bool setIsInformativeValue(int const &portMapIndex, bool newIsInformativeValue) const
std::string getLogicalPresence(int const &portMapIndex)
void setupAbstractionDefinition(QSharedPointer< AbstractionDefinition const > absDef)
void setupSystemGroup(QString const &systemGroup)
bool setPhysicalLeftBound(int const &portMapIndex, std::string const &newPhysicalLeft)
std::string getLogicalPresenceWithLogicalPort(std::string const &logicalName)
virtual bool validateItems() const override final
virtual std::vector< std::string > getItemNames() const override final
std::string getSystemGroup() const
std::string getPhysicalRightBoundValue(int const &portMapIndex, int const &baseNumber=0) const
std::string getPhysicalLeftBoundValue(int const &portMapIndex, int const &baseNumber=0) const
bool physicalPortIsValid(int const &portMapIndex) const
bool logicalPortIsValid(int const &portMapIndex) const
bool setPhysicalPort(int const &portMapIndex, std::string const &newPhysicalName)
bool setPhysicalRightBound(int const &portMapIndex, std::string const &newPhysicalRight)
std::string getPhysicalPortIconPath(int const &portMapIndex) const
std::string getLogicalLeftBoundFormattedExpression(int const &portMapIndex) const
bool connectedPortsHaveValidDirections(int const &portMapIndex) const
std::string getLogicalRightBoundExpression(int const &portMapIndex) const
bool hasPhysicalPort(int const &portMapIndex) const
bool setInvertValue(int const &portMapIndex, bool newInvertValue) const
void createRequiredSignals()
bool removePortMap(int const &portMapIndex)
bool physicalMappingIsValid(int const &portMapIndex) const
bool connectPorts(std::string const &logicalPortName, std::string const &physicalPortName)
bool setLogicalTieOff(int const &portMapIndex, std::string const &newTieOff)
std::vector< std::string > removeAllPortMapsFromLogicalPort(std::string const &logicalPortName)
std::vector< std::string > getExpressionsInSelectedPortMap(int const &portMapIndex) const
std::string getLogicalTieOffValue(int const &portMapIndex, int const &baseNumber=0) const
std::string getPhysicalRightBoundFormattedExpression(int const &portMapIndex) const
bool getInvertBool(int const &portMapIndex) const
std::string getLogicalTieOffExpression(int const &portMapIndex) const
std::string getLogicalRightBoundValue(int const &portMapIndex, int const &baseNumber=0) const
std::string getInvertString(int const &portMapIndex) const
virtual int itemCount() const override final
std::string getLogicalTieOffFormattedExpression(int const &portMapIndex) const
bool logicalPortHasValidRange(int const &portMapIndex) const
bool connectedPortsHaveValidPortTypes(int const &portMapIndex) const
void setupPhysicalPorts(Port::List ports)
void addPortMap(int const &row)
std::string getLogicalRightBoundFormattedExpression(int const &portMapIndex) const
std::string getPhysicalRightBoundExpression(int const &portMapIndex) const
virtual int getAllReferencesToIdInItem(const std::string &itemName, std::string const &valueID) const override final
bool setLogicalLeftBound(int const &portMapIndex, std::string const &newLogicalLeft)
bool connectedPortsHaveSameRange(int const &portMapIndex) const
bool setLogicalRightBound(int const &portMapIndex, std::string const &newLogicalRight)
PortMapInterface(QSharedPointer< PortMapValidator > validator, QSharedPointer< ExpressionParser > expressionParser, QSharedPointer< ExpressionFormatter > expressionFormatter, PortsInterface *physicalPortInterface, PortAbstractionInterface *logicalPortInterface)
std::string getLogicalLeftBoundExpression(int const &portMapIndex) const
void setupBusMode(General::InterfaceMode busMode)
virtual std::string getIndexedItemName(int const &itemIndex) const
void createOptionalSignals()
std::string getIsInformativeString(int const &portMapIndex) const
std::string getPhysicalLeftBoundFormattedExpression(int const &portMapIndex) const
bool connectedPortsHaveValidInitiatives(int const &portMapIndex) const
bool getIsInformativeValue(int const &portMapIndex) const
std::string getPhysicalPortName(int const &portMapIndex) const
std::string getLogicalLeftBoundValue(int const &portMapIndex, int const &baseNumber=0) const
BooleanValue getInvertValue(int const &portMapIndex) const
virtual ~PortMapInterface()=default
PortMap * getPortMapPointer(int const &portMapIndex) const
General::InterfaceMode getInterfaceMode() const
std::string getLogicalPortIconPath(int const &portMapIndex) const
std::string getLogicalPortName(int const &portMapIndex) const
virtual void setupPortMaps(QSharedPointer< AbstractionType > abstractionType)
Interface for editing component ports.