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

Interface for accessing design ad hoc connections. More...

#include <AdHocConnectionInterface.h>

Inheritance diagram for AdHocConnectionInterface:
NameGroupInterface CommonInterface

Public Member Functions

 AdHocConnectionInterface ()
 
 AdHocConnectionInterface (const AdHocConnectionInterface &other)=delete
 No copying. No assignment.
 
virtual ~AdHocConnectionInterface ()=default
 
void addAdHocConnection (std::string const &startComponentInstance, std::string const &startPort, std::string const &endComponentInstance, std::string const &endPort, std::string const &connectionName="")
 
void addHierarchicalAdHocConnection (std::string const &instanceName, std::string const &instancePort, std::string const &topPort, std::string const &connectionName="")
 
bool adHocConnectionExists (std::string const &connectionName) const
 
std::string getConnectionName (std::string const &startInstanceName, std::string const &startPortName, std::string const &endInstanceName, std::string const &endPortName) const
 
virtual std::string getDescription (std::string const &itemName) const override final
 
std::string getHierarchicalConnectionName (std::string const &instanceName, std::string const &instancePort, std::string const &topPort) const
 
std::string getIndexedItemName (int itemIndex) const final
 
virtual int getItemIndex (std::string const &itemName) const override final
 
virtual std::vector< std::string > getItemNames () const override final
 
virtual int itemCount () const override final
 
virtual bool itemHasValidName (std::string const &itemName) const override final
 
AdHocConnectionInterfaceoperator= (const AdHocConnectionInterface &other)=delete
 
bool removeAdHocConnection (std::string const &connectionName)
 
bool removeInstanceAdHocConnections (std::string const &instanceName)
 
void renameComponentReferences (std::string const &currentName, std::string const &newName)
 
void setConnections (QSharedPointer< Design > newDesign)
 
virtual bool setDescription (std::string const &itemName, std::string const &newDescription) override final
 
virtual bool setName (std::string const &currentName, std::string const &newName) override final
 
virtual bool validateItems () const override final
 
- Public Member Functions inherited from NameGroupInterface
 NameGroupInterface ()
 
 NameGroupInterface (const NameGroupInterface &other)=delete
 No copying. No assignment.
 
virtual ~NameGroupInterface ()=default
 
virtual std::string getDisplayName (std::string const &itemName) const
 
virtual std::string getShortDescription (std::string const &itemName) const
 
NameGroupInterfaceoperator= (const NameGroupInterface &other)=delete
 
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 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 accessing design ad hoc connections.

Definition at line 25 of file AdHocConnectionInterface.h.

Constructor & Destructor Documentation

◆ AdHocConnectionInterface() [1/2]

AdHocConnectionInterface::AdHocConnectionInterface ( )

The constructor.

◆ ~AdHocConnectionInterface()

virtual AdHocConnectionInterface::~AdHocConnectionInterface ( )
virtualdefault

The destructor.

◆ AdHocConnectionInterface() [2/2]

AdHocConnectionInterface::AdHocConnectionInterface ( const AdHocConnectionInterface & other)
delete

No copying. No assignment.

Member Function Documentation

◆ addAdHocConnection()

void AdHocConnectionInterface::addAdHocConnection ( std::string const & startComponentInstance,
std::string const & startPort,
std::string const & endComponentInstance,
std::string const & endPort,
std::string const & connectionName = "" )

Add a new ad hoc connection.

Parameters
[in]startComponentInstanceName of the component instance containing the first port.
[in]startPortName of the first port.
[in]endComponentInstanceName of the component instance containing the second port.
[in]endPortName of the second port.
[in]connectionNameName of the new ad hoc connection.

◆ addHierarchicalAdHocConnection()

void AdHocConnectionInterface::addHierarchicalAdHocConnection ( std::string const & instanceName,
std::string const & instancePort,
std::string const & topPort,
std::string const & connectionName = "" )

Add a new hierarchical ad hoc connection.

Parameters
[in]instanceNameName of the component instance containing the selected port.
[in]instancePortName of the selected port.
[in]topPortName of the top component port.
[in]connectionNameName of the new ad hoc connection.

◆ adHocConnectionExists()

bool AdHocConnectionInterface::adHocConnectionExists ( std::string const & connectionName) const

Check if the selected ad hoc connection exists.

Parameters
[in]connectionNameName of the selected ad hoc connection.
Returns
True, if the ad hoc connection exists, false otherwise.

◆ getConnectionName()

std::string AdHocConnectionInterface::getConnectionName ( std::string const & startInstanceName,
std::string const & startPortName,
std::string const & endInstanceName,
std::string const & endPortName ) const

Get the name of the selected ad hoc connection.

Parameters
[in]startInstanceNameName of the instance containing the first port.
[in]startPortNameName of the first port.
[in]endInstanceNameName of the instance containing the second port.
[in]endPortNameName of the second port.
Returns
Name of the selected ad hoc connection.

◆ getDescription()

virtual std::string AdHocConnectionInterface::getDescription ( std::string const & itemName) const
finaloverridevirtual

Get the description of the selected ad hoc connection.

Parameters
[in]itemNameName of the selected ad hoc connection.
Returns
Description of the selected ad hoc connection.

Reimplemented from NameGroupInterface.

◆ getHierarchicalConnectionName()

std::string AdHocConnectionInterface::getHierarchicalConnectionName ( std::string const & instanceName,
std::string const & instancePort,
std::string const & topPort ) const

Get the name of the selected hierarchical ad hoc connection.

Parameters
[in]instanceNameName of the component instance containing the selected port.
[in]instancePortName of the selected component instance port.
[in]topPortName of the top component port.
Returns
Name of the selected ad hoc connection.

◆ getIndexedItemName()

std::string AdHocConnectionInterface::getIndexedItemName ( int itemIndex) const
finalvirtual

Get name of the indexed ad hoc connection.

Parameters
[in]itemIndexIndex of the selected ad hoc connection.
Returns
Name of the selected ad hoc connection.

Implements NameGroupInterface.

◆ getItemIndex()

virtual int AdHocConnectionInterface::getItemIndex ( std::string const & itemName) const
finaloverridevirtual

Get index of the selected ad hoc connection.

Parameters
[in]itemNameName of the selected ad hoc connection.
Returns
Index of the selected ad hoc connection.

Implements NameGroupInterface.

◆ getItemNames()

virtual std::vector< std::string > AdHocConnectionInterface::getItemNames ( ) const
finaloverridevirtual

Get the names of the available bus interfaces.

Returns
Names of the available bus interfaces.

Implements CommonInterface.

◆ itemCount()

virtual int AdHocConnectionInterface::itemCount ( ) const
finaloverridevirtual

Get the number of available ad hoc connections.

Returns
Number of available ad hoc connections.

Implements CommonInterface.

◆ itemHasValidName()

virtual bool AdHocConnectionInterface::itemHasValidName ( std::string const & itemName) const
finaloverridevirtual

Check if the selected ad hoc connection has a valid name.

Parameters
[in]itemNameName of the selected ad hoc connection.
Returns
True, if the name is valid, false otherwise.

Implements NameGroupInterface.

◆ operator=()

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

◆ removeAdHocConnection()

bool AdHocConnectionInterface::removeAdHocConnection ( std::string const & connectionName)

Remove the selected ad hoc connection.

Parameters
[in]busNameName of the selected ad hoc connection.
Returns
True, if successful, false otherwise.

◆ removeInstanceAdHocConnections()

bool AdHocConnectionInterface::removeInstanceAdHocConnections ( std::string const & instanceName)

Remove ad hoc connections connected to the selected component instance.

Parameters
[in]instanceNameName of the selected component instance.
Returns
True, if successful, false otherwise.

◆ renameComponentReferences()

void AdHocConnectionInterface::renameComponentReferences ( std::string const & currentName,
std::string const & newName )

Rename the component references in connections.

Parameters
[in]currentNameCurrent name of the component instance.
[in]newNameNew name for the component instance.

◆ setConnections()

void AdHocConnectionInterface::setConnections ( QSharedPointer< Design > newDesign)

Setup the ad hoc connections.

Parameters
[in]newDesignDesign containing the ad hoc connections.

◆ setDescription()

virtual bool AdHocConnectionInterface::setDescription ( std::string const & itemName,
std::string const & newDescription )
finaloverridevirtual

Set a new description for the selected ad hoc connection.

Parameters
[in]itemNameName of the selected ad hoc connection.
[in]newDescriptionNew description.
Returns
True, if successful, false otherwise.

Reimplemented from NameGroupInterface.

◆ setName()

virtual bool AdHocConnectionInterface::setName ( std::string const & currentName,
std::string const & newName )
finaloverridevirtual

Set a new name for the selected ad hoc connection.

Parameters
[in]currentNameName of the selected ad hoc connection.
[in]newNameNew name for the ad hoc connection.
Returns
True, if successful, false otherwise.

Implements NameGroupInterface.

◆ validateItems()

virtual bool AdHocConnectionInterface::validateItems ( ) const
finaloverridevirtual

Validates the contained ad hoc connections.

Returns
True, if all the ad hoc connections are valid, false otherwise.

Implements CommonInterface.


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