Skip to content

Commit

Permalink
Merge branch 'parameter-editor-busdef-absdef'
Browse files Browse the repository at this point in the history
  • Loading branch information
hagantsa committed Oct 4, 2024
2 parents a511db4 + a3f4c83 commit b846c6f
Show file tree
Hide file tree
Showing 55 changed files with 3,037 additions and 1,253 deletions.
32 changes: 32 additions & 0 deletions IPXACTmodels/AbstractionDefinition/AbstractionDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,38 @@ QSharedPointer<QList<QSharedPointer<PortAbstraction> > > AbstractionDefinition::
return logicalPorts_;
}

//-----------------------------------------------------------------------------
// Function: AbstractionDefinition::getPortsWithWire()
//-----------------------------------------------------------------------------
QList<QSharedPointer<PortAbstraction> > AbstractionDefinition::getPortsWithWire() const
{
QList<QSharedPointer<PortAbstraction> > wirePorts;
std::for_each(logicalPorts_->cbegin(), logicalPorts_->cend(), [&wirePorts](QSharedPointer<PortAbstraction> portAbstraction)
{
if (portAbstraction->hasWire())
{
wirePorts.append(portAbstraction);
}
});
return wirePorts;
}

//-----------------------------------------------------------------------------
// Function: AbstractionDefinition::getPortsWithTransactional()
//-----------------------------------------------------------------------------
QList<QSharedPointer<PortAbstraction> > AbstractionDefinition::getPortsWithTransactional() const
{
QList<QSharedPointer<PortAbstraction> > transPorts;
std::for_each(logicalPorts_->cbegin(), logicalPorts_->cend(), [&transPorts](QSharedPointer<PortAbstraction> portAbstraction)
{
if (portAbstraction->hasTransactional())
{
transPorts.append(portAbstraction);
}
});
return transPorts;
}

//-----------------------------------------------------------------------------
// Function: AbstractionDefinition::setChoices()
//-----------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions IPXACTmodels/AbstractionDefinition/AbstractionDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ class IPXACTMODELS_EXPORT AbstractionDefinition: public Document
*/
QSharedPointer<QList<QSharedPointer<PortAbstraction> > > getLogicalPorts() const;

QList<QSharedPointer<PortAbstraction> > getPortsWithWire() const;

QList<QSharedPointer<PortAbstraction> > getPortsWithTransactional() const;

/*!
* Sets the choices of the abstraction definition.
*
Expand Down
Loading

0 comments on commit b846c6f

Please sign in to comment.