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

Interface for accessing component instances. More...

#include <ComponentInstanceInterface.h>

Inheritance diagram for ComponentInstanceInterface:
NameGroupInterface CommonInterface

Public Member Functions

 ComponentInstanceInterface (const ComponentInstanceInterface &other)=delete
 No copying. No assignment.
 
 ComponentInstanceInterface (InterconnectionInterface *connectionInterface, AdHocConnectionInterface *adHocInterface)
 
virtual ~ComponentInstanceInterface ()=default
 
void addComponentInstance (std::string const &instanceName="")
 
QSharedPointer< ConfigurableVLNVReference > getComponentReference (std::string const &instanceName) const
 
virtual std::string getDescription (std::string const &itemName) const override final
 
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
 
bool instanceExists (std::string const &instanceName) const
 
virtual int itemCount () const override final
 
virtual bool itemHasValidName (std::string const &itemName) const override final
 
ComponentInstanceInterfaceoperator= (const ComponentInstanceInterface &other)=delete
 
bool removeComponentInstance (std::string const &instanceName)
 
void setComponentInstances (QSharedPointer< Design > newDesign)
 
bool setComponentReference (std::string const &instanceName, std::string const &newVendor, std::string const &newLibrary, std::string const &newName, std::string const &newVersion)
 
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 component instances.

Definition at line 29 of file ComponentInstanceInterface.h.

Constructor & Destructor Documentation

◆ ComponentInstanceInterface() [1/2]

ComponentInstanceInterface::ComponentInstanceInterface ( InterconnectionInterface * connectionInterface,
AdHocConnectionInterface * adHocInterface )

The constructor.

Parameters
[in]connectionInterfaceInterface for accessing interconnections.
[in]adHocInterfaceInterface for accessing ad hoc connections.

◆ ~ComponentInstanceInterface()

virtual ComponentInstanceInterface::~ComponentInstanceInterface ( )
virtualdefault

The destructor.

◆ ComponentInstanceInterface() [2/2]

ComponentInstanceInterface::ComponentInstanceInterface ( const ComponentInstanceInterface & other)
delete

No copying. No assignment.

Member Function Documentation

◆ addComponentInstance()

void ComponentInstanceInterface::addComponentInstance ( std::string const & instanceName = "")

Add a new component instance.

Parameters
[in]instanceNameName of the new component instance.

◆ getComponentReference()

QSharedPointer< ConfigurableVLNVReference > ComponentInstanceInterface::getComponentReference ( std::string const & instanceName) const

Get the VLNV of the referenced component of the selected component instance.

Parameters
[in]instanceNameName of the selected component instance.
Returns
VLNV of the referenced component.

◆ getDescription()

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

Get the description of the selected component instance.

Parameters
[in]itemNameName of the selected component instance.
Returns
Description of the selected component instance.

Reimplemented from NameGroupInterface.

◆ getIndexedItemName()

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

Get name of the indexed component instance.

Parameters
[in]itemIndexIndex of the selected component instance.
Returns
Name of the selected component instance.

Implements NameGroupInterface.

◆ getItemIndex()

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

Get index of the selected component instance.

Parameters
[in]itemNameName of the selected component instance.
Returns
Index of the selected component instance.

Implements NameGroupInterface.

◆ getItemNames()

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

Get the names of the available component instances.

Returns
Names of the available component instances.

Implements CommonInterface.

◆ instanceExists()

bool ComponentInstanceInterface::instanceExists ( std::string const & instanceName) const

Check if the selected component instance exists.

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

◆ itemCount()

virtual int ComponentInstanceInterface::itemCount ( ) const
finaloverridevirtual

Get the number of available component instances.

Returns
Number of available component instances.

Implements CommonInterface.

◆ itemHasValidName()

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

Check if the selected component instance has a valid name.

Parameters
[in]itemNameName of the selected component instance.
Returns
True, if the name is valid, false otherwise.

Implements NameGroupInterface.

◆ operator=()

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

◆ removeComponentInstance()

bool ComponentInstanceInterface::removeComponentInstance ( std::string const & instanceName)

Remove the selected component instance.

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

◆ setComponentInstances()

void ComponentInstanceInterface::setComponentInstances ( QSharedPointer< Design > newDesign)

Setup the component instances.

Parameters
[in]newDesignDesign containing the component instances.

◆ setComponentReference()

bool ComponentInstanceInterface::setComponentReference ( std::string const & instanceName,
std::string const & newVendor,
std::string const & newLibrary,
std::string const & newName,
std::string const & newVersion )

Set a new component reference for the selected component instance.

Parameters
[in]instanceNameName of the selected component instance.
[in]newVendorVendor of the new component reference.
[in]newLibraryLibrary of the new component reference.
[in]newNameName of the new component reference.
[in]newVersionVersion of the new component reference.
Returns
True, if successful, false otherwise.

◆ setDescription()

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

Set a new description for the selected component instance.

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

Reimplemented from NameGroupInterface.

◆ setName()

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

Set a new name for the selected component instance.

Parameters
[in]currentNameName of the selected component instance.
[in]newNameNew name for the component instance.
Returns
True, if successful, false otherwise.

Implements NameGroupInterface.

◆ validateItems()

virtual bool ComponentInstanceInterface::validateItems ( ) const
finaloverridevirtual

Validates the contained component instances.

Returns
True, if all the component instances are valid, false otherwise.

Implements CommonInterface.


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