diff --git a/IPXACTmodels/Component/Port.cpp b/IPXACTmodels/Component/Port.cpp index 3cca44310..6d8591c87 100644 --- a/IPXACTmodels/Component/Port.cpp +++ b/IPXACTmodels/Component/Port.cpp @@ -22,11 +22,7 @@ //----------------------------------------------------------------------------- Port::Port(QString const& portName) : NameGroup(portName), -Extendable(), -isPresent_(), -wire_(), -transactional_(), -configurableArrays_(new QList > ()) +Extendable() { } @@ -37,10 +33,7 @@ configurableArrays_(new QList > ()) Port::Port(const Port &other): NameGroup(other), Extendable(other), -isPresent_(other.isPresent_), -wire_(), -transactional_(), -configurableArrays_(new QList > ()) +isPresent_(other.isPresent_) { if (other.wire_) { @@ -68,7 +61,7 @@ Port & Port::operator=( const Port &other ) if (other.wire_) { - wire_ = QSharedPointer(new Wire(*other.wire_.data())); + wire_ = QSharedPointer(new Wire(*other.wire_)); } else { @@ -77,7 +70,7 @@ Port & Port::operator=( const Port &other ) if (other.transactional_) { - transactional_ = QSharedPointer(new Transactional(*other.transactional_.data())); + transactional_ = QSharedPointer(new Transactional(*other.transactional_)); } else { @@ -90,16 +83,6 @@ Port & Port::operator=( const Port &other ) return *this; } -//----------------------------------------------------------------------------- -// Function: Port::~Port() -//----------------------------------------------------------------------------- -Port::~Port() -{ - wire_.clear(); - transactional_.clear(); - configurableArrays_.clear(); -} - //----------------------------------------------------------------------------- // Function: Port::getWire() //----------------------------------------------------------------------------- @@ -113,18 +96,12 @@ QSharedPointer Port::getWire() const //----------------------------------------------------------------------------- void Port::setWire(QSharedPointer newWire) { - if (wire_) - { - wire_.clear(); - } - if (transactional_) { transactional_.clear(); } - // change the port type - wire_ = QSharedPointer(newWire); + wire_ = newWire; } //----------------------------------------------------------------------------- @@ -145,12 +122,7 @@ void Port::setTransactional(QSharedPointer newTransactional) wire_.clear(); } - if (transactional_) - { - transactional_.clear(); - } - - transactional_ = QSharedPointer(newTransactional); + transactional_ = newTransactional; } //----------------------------------------------------------------------------- @@ -158,12 +130,9 @@ void Port::setTransactional(QSharedPointer newTransactional) //----------------------------------------------------------------------------- QString Port::getLeftBound() const { - if (wire_) + if (wire_ && wire_->getVector()) { - if (wire_->getVector()) - { - return wire_->getVectorLeftBound(); - } + return wire_->getVectorLeftBound(); } return QStringLiteral("0"); @@ -174,15 +143,12 @@ QString Port::getLeftBound() const //----------------------------------------------------------------------------- void Port::setLeftBound(QString const& newLeftBound) { - if (wire_) - { - wire_->setVectorLeftBound(newLeftBound); - } - else + if (wire_.isNull()) { wire_ = QSharedPointer(new Wire()); - wire_->setVectorLeftBound(newLeftBound); } + + wire_->setVectorLeftBound(newLeftBound); } //----------------------------------------------------------------------------- @@ -190,12 +156,9 @@ void Port::setLeftBound(QString const& newLeftBound) //----------------------------------------------------------------------------- QString Port::getRightBound() const { - if (wire_) + if (wire_ && wire_->getVector()) { - if (wire_->getVector()) - { - return wire_->getVectorRightBound(); - } + return wire_->getVectorRightBound(); } return QStringLiteral("0"); @@ -206,15 +169,12 @@ QString Port::getRightBound() const //----------------------------------------------------------------------------- void Port::setRightBound(QString const& newRightBound) { - if (wire_) - { - wire_->setVectorRightBound(newRightBound); - } - else + if (wire_.isNull()) { wire_ = QSharedPointer(new Wire()); - wire_->setVectorRightBound(newRightBound); } + + wire_->setVectorRightBound(newRightBound); } //----------------------------------------------------------------------------- @@ -322,7 +282,7 @@ void Port::setAllLogicalDirectionsAllowed( bool allowed ) //----------------------------------------------------------------------------- // Function: Port::getTypeName() //----------------------------------------------------------------------------- -QString Port::getTypeName( const QString& viewName /*= QString("")*/ ) const +QString Port::getTypeName( const QString& viewName ) const { if (wire_) { @@ -341,7 +301,7 @@ QString Port::getTypeName( const QString& viewName /*= QString("")*/ ) const //----------------------------------------------------------------------------- // Function: Port::setTypeName() //----------------------------------------------------------------------------- -void Port::setTypeName( const QString& typeName, const QString& viewName /*= QString("")*/ ) +void Port::setTypeName( const QString& typeName, const QString& viewName ) { if (wire_) { @@ -361,7 +321,7 @@ void Port::setTypeName( const QString& typeName, const QString& viewName /*= QSt //----------------------------------------------------------------------------- // Function: Port::hasType() //----------------------------------------------------------------------------- -bool Port::hasType( const QString& viewName /*= QString("")*/ ) const +bool Port::hasType( const QString& viewName ) const { if (wire_) { @@ -378,7 +338,7 @@ bool Port::hasType( const QString& viewName /*= QString("")*/ ) const //----------------------------------------------------------------------------- // Function: Port::getTypeDefinition() //----------------------------------------------------------------------------- -QString Port::getTypeDefinition( const QString& typeName ) +QString Port::getTypeDefinition( const QString& typeName ) const { if (wire_) { @@ -457,15 +417,8 @@ bool Port::hasTypeDefinitions() const //----------------------------------------------------------------------------- bool Port::isAdHocVisible() const { - foreach (QSharedPointer extension, *getVendorExtensions()) - { - if (extension->type() == QLatin1String("kactus2:adHocVisible")) - { - return true; - } - } - - return false; + return std::any_of(getVendorExtensions()->cbegin(), getVendorExtensions()->cend(), + [](auto const& extension) { return extension->type() == QStringLiteral("kactus2:adHocVisible"); }); } //----------------------------------------------------------------------------- @@ -473,9 +426,9 @@ bool Port::isAdHocVisible() const //----------------------------------------------------------------------------- void Port::setAdHocVisible(bool visible) { - foreach (QSharedPointer extension, *getVendorExtensions()) + for (QSharedPointer extension : *getVendorExtensions()) { - if (extension->type() == QLatin1String("kactus2:adHocVisible")) + if (extension->type() == QStringLiteral("kactus2:adHocVisible")) { if (!visible) { @@ -498,7 +451,7 @@ void Port::setAdHocVisible(bool visible) //----------------------------------------------------------------------------- QPointF Port::getDefaultPos() const { - foreach (QSharedPointer extension, *getVendorExtensions()) + for (QSharedPointer extension : *getVendorExtensions()) { if (extension->type() == QLatin1String("kactus2:position")) { @@ -515,7 +468,7 @@ QPointF Port::getDefaultPos() const //----------------------------------------------------------------------------- void Port::setDefaultPos(QPointF const& pos) { - foreach (QSharedPointer extension, *getVendorExtensions()) + for (QSharedPointer extension : *getVendorExtensions()) { if (extension->type() == QLatin1String("kactus2:position")) { @@ -610,9 +563,9 @@ void Port::setArrayRight(QString const& newArrayRight) //----------------------------------------------------------------------------- // Function: port::getPortTags() //----------------------------------------------------------------------------- -const QString Port::getPortTags() const +QString Port::getPortTags() const { - foreach (QSharedPointer extension, *getVendorExtensions()) + for (QSharedPointer extension : *getVendorExtensions()) { if (extension->type() == QLatin1String("kactus2:portTags")) { @@ -629,7 +582,7 @@ const QString Port::getPortTags() const //----------------------------------------------------------------------------- void Port::setPortTags(const QString& newPortTags) { - foreach (QSharedPointer extension, *getVendorExtensions()) + for (QSharedPointer extension : *getVendorExtensions()) { if (extension->type() == QLatin1String("kactus2:portTags")) { @@ -679,7 +632,7 @@ QSharedPointer > > Port::getArrays() const //----------------------------------------------------------------------------- void Port::copyArrays(const Port& other) { - foreach (QSharedPointer configurableArray, *other.configurableArrays_) + for (QSharedPointer configurableArray : *other.configurableArrays_) { if (configurableArray) { @@ -697,14 +650,14 @@ void Port::copyArrays(const Port& other) //----------------------------------------------------------------------------- QSharedPointer > > Port::getTypes() const { - if (getWire()) + if (wire_) { - return getWire()->getWireTypeDefs(); + return wire_->getWireTypeDefs(); } - else if (getTransactional()) + else if (wire_) { - return getTransactional()->getTransTypeDef(); + return transactional_->getTransTypeDef(); } - return QSharedPointer > >(); + return nullptr; } diff --git a/IPXACTmodels/Component/Port.h b/IPXACTmodels/Component/Port.h index 9d46c4e78..f13039823 100644 --- a/IPXACTmodels/Component/Port.h +++ b/IPXACTmodels/Component/Port.h @@ -43,7 +43,7 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable * * @param [in] portName Name of the port. */ - Port(QString const& portName = QString()); + explicit Port(QString const& portName = QString()); /*! * Copy constructor. @@ -58,7 +58,7 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable /*! * The destructor. */ - ~Port(); + ~Port() = default; /*! * Get a pointer to the wire element. @@ -172,7 +172,7 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable * * @return The matching type name. */ - QString getTypeName(const QString& viewName = QLatin1String("")) const; + QString getTypeName(const QString& viewName = QString()) const; /*! * Set the type name for the port in given view. @@ -180,7 +180,7 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable * @param [in] typeName The name of the type. * @param [in] viewName The name of the view used for this type. */ - void setTypeName(const QString& typeName, const QString& viewName = QLatin1String("")); + void setTypeName(const QString& typeName, const QString& viewName = QString()); /*! * Check if the port has a type name in given view. @@ -197,7 +197,7 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable * @param [in] typeName The name of the type that's type definition is wanted. * @return The found type definition. */ - QString getTypeDefinition(const QString& typeName); + QString getTypeDefinition(const QString& typeName) const; /*! * Get the type definitions of the wired port. @@ -278,7 +278,7 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable * * @return Tags associated with the port. */ - const QString getPortTags() const; + QString getPortTags() const; /*! * Set the port tags. @@ -332,13 +332,13 @@ class IPXACTMODELS_EXPORT Port : public NameGroup, public Extendable QString isPresent_; //! The wire port type. - QSharedPointer wire_; + QSharedPointer wire_{ nullptr }; //! Transactional port type. - QSharedPointer transactional_; + QSharedPointer transactional_{ nullptr }; //! The list of arrays. - QSharedPointer > > configurableArrays_; + QSharedPointer > > configurableArrays_{ new QList >() }; }; Q_DECLARE_METATYPE(QSharedPointer) diff --git a/IPXACTmodels/Component/PortReader.cpp b/IPXACTmodels/Component/PortReader.cpp index 5a8e5b9cd..d6a24ac2e 100644 --- a/IPXACTmodels/Component/PortReader.cpp +++ b/IPXACTmodels/Component/PortReader.cpp @@ -309,9 +309,7 @@ void PortReader::parseArrays(QDomNode const& portNode, QSharedPointer newP QString arrayLeft = arrayNode.firstChildElement(QStringLiteral("ipxact:left")).firstChild().nodeValue(); QString arrayRight = arrayNode.firstChildElement(QStringLiteral("ipxact:right")).firstChild().nodeValue(); - QSharedPointer newArray (new Array(arrayLeft, arrayRight)); - - newPort->getArrays()->append(newArray); + newPort->getArrays()->append(QSharedPointer(new Array(arrayLeft, arrayRight))); } } diff --git a/IPXACTmodels/Component/Transactional.cpp b/IPXACTmodels/Component/Transactional.cpp index ad2980a65..b9e219851 100644 --- a/IPXACTmodels/Component/Transactional.cpp +++ b/IPXACTmodels/Component/Transactional.cpp @@ -13,21 +13,8 @@ #include -//----------------------------------------------------------------------------- -// Function: Transactional::Transactional() -//----------------------------------------------------------------------------- -Transactional::Transactional() : -allLogicalInitiativesAllowed_(false), -initiative_(), -kind_(), -busWidth_(), -protocol_(), -transTypeDefs_(new QList > ()), -maxConnections_(), -minConnections_() -{ +#include -} //----------------------------------------------------------------------------- // Function: Transactional::Transactional() @@ -37,8 +24,6 @@ allLogicalInitiativesAllowed_(other.allLogicalInitiativesAllowed_), initiative_(other.initiative_), kind_(other.kind_), busWidth_(other.busWidth_), -protocol_(), -transTypeDefs_(new QList > ()), maxConnections_(other.maxConnections_), minConnections_(other.minConnections_) { @@ -47,7 +32,7 @@ minConnections_(other.minConnections_) protocol_ = QSharedPointer(new Protocol(*other.protocol_)); } - copyTransactionalTypeDefinitions(other); + Copy::copyList(other.transTypeDefs_, transTypeDefs_); } //----------------------------------------------------------------------------- @@ -71,21 +56,12 @@ Transactional& Transactional::operator=( const Transactional& other) } transTypeDefs_->clear(); - copyTransactionalTypeDefinitions(other); + Copy::copyList(other.transTypeDefs_, transTypeDefs_); } return *this; } -//----------------------------------------------------------------------------- -// Function: Transactional::~Transactional() -//----------------------------------------------------------------------------- -Transactional::~Transactional() -{ - protocol_.clear(); - transTypeDefs_.clear(); -} - //----------------------------------------------------------------------------- // Function: Transactional::getAllLogicalInitiativesAllowed() //----------------------------------------------------------------------------- @@ -97,9 +73,9 @@ bool Transactional::getAllLogicalInitiativesAllowed() const //----------------------------------------------------------------------------- // Function: Transactional::setAllLogicalInitiativesAllowed() //----------------------------------------------------------------------------- -void Transactional::setAllLogicalInitiativesAllowed(bool allLogicalInitiativesAllowed) +void Transactional::setAllLogicalInitiativesAllowed(bool allow) { - allLogicalInitiativesAllowed_ = allLogicalInitiativesAllowed; + allLogicalInitiativesAllowed_ = allow; } //----------------------------------------------------------------------------- @@ -223,7 +199,7 @@ void Transactional::setMinConnections(QString const& newMinConnectionsExpression //----------------------------------------------------------------------------- QString Transactional::getTypeName(QString const& viewName) const { - foreach (QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { if (transactionalTypeDefinition->hasView(viewName)) { @@ -239,7 +215,7 @@ QString Transactional::getTypeName(QString const& viewName) const //----------------------------------------------------------------------------- void Transactional::setTypeName(QString const& typeName, QString const& viewName) { - foreach (QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { if (transactionalTypeDefinition->getViewRefs()->contains(viewName) || viewName.isEmpty()) { @@ -252,7 +228,8 @@ void Transactional::setTypeName(QString const& typeName, QString const& viewName if (!typeName.isEmpty()) { - QSharedPointer newTransactionalTypeDefinition(new WireTypeDef(typeName, viewName)); + QSharedPointer newTransactionalTypeDefinition(new WireTypeDef(typeName)); + newTransactionalTypeDefinition->getViewRefs()->append(viewName); transTypeDefs_->append(newTransactionalTypeDefinition); } } @@ -262,7 +239,7 @@ void Transactional::setTypeName(QString const& typeName, QString const& viewName //----------------------------------------------------------------------------- bool Transactional::hasType(QString const& viewName) const { - foreach (QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { if ((viewName.isEmpty() && !transactionalTypeDefinition->getTypeName().isEmpty()) || (transactionalTypeDefinition->hasView(viewName) && @@ -279,7 +256,7 @@ bool Transactional::hasType(QString const& viewName) const //----------------------------------------------------------------------------- QString Transactional::getTypeDefinition(QString const& typeName) const { - foreach (QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { if (transactionalTypeDefinition->getTypeName() == typeName) { @@ -296,9 +273,9 @@ QString Transactional::getTypeDefinition(QString const& typeName) const QStringList Transactional::getTypeDefinitions() const { QStringList typeDefs; - foreach (QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { - foreach (QString singleDefinition, *transactionalTypeDefinition->getTypeDefinitions()) + for (QString singleDefinition : *transactionalTypeDefinition->getTypeDefinitions()) { typeDefs.append(singleDefinition); } @@ -311,7 +288,7 @@ QStringList Transactional::getTypeDefinitions() const //----------------------------------------------------------------------------- void Transactional::setTypeDefinition(const QString& typeName, const QString& typeDefinition) { - foreach (QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { if (transactionalTypeDefinition->getTypeName() == typeName) { @@ -336,7 +313,7 @@ void Transactional::setTypeDefinition(const QString& typeName, const QString& ty //----------------------------------------------------------------------------- bool Transactional::hasTypeDefinitions() const { - foreach(QSharedPointer transactionalTypeDefinition, *transTypeDefs_) + for (QSharedPointer transactionalTypeDefinition : *transTypeDefs_) { if (!transactionalTypeDefinition->getTypeName().isEmpty() || !transactionalTypeDefinition->getTypeDefinitions()->isEmpty()) @@ -347,19 +324,3 @@ bool Transactional::hasTypeDefinitions() const return false; } - -//----------------------------------------------------------------------------- -// Function: Transactional::copyTransactionalTypeDefinitions() -//----------------------------------------------------------------------------- -void Transactional::copyTransactionalTypeDefinitions(const Transactional& other) -{ - foreach (QSharedPointer transactionalTypeDefinition, *other.transTypeDefs_) - { - if (transactionalTypeDefinition) - { - QSharedPointer copy = - QSharedPointer (new WireTypeDef(*transactionalTypeDefinition.data())); - transTypeDefs_->append(copy); - } - } -} \ No newline at end of file diff --git a/IPXACTmodels/Component/Transactional.h b/IPXACTmodels/Component/Transactional.h index e4f79d71d..16f1e7c7e 100644 --- a/IPXACTmodels/Component/Transactional.h +++ b/IPXACTmodels/Component/Transactional.h @@ -30,10 +30,8 @@ class IPXACTMODELS_EXPORT Transactional public: - /*! - * The constructor. - */ - Transactional(); + //! The default constructor. + Transactional() = default; /*! * Copy constructor. @@ -45,11 +43,6 @@ class IPXACTMODELS_EXPORT Transactional */ Transactional &operator=(const Transactional &other); - /*! - * The destructor. - */ - ~Transactional(); - /*! * Get the all logical initiatives allowed settings. * @@ -60,9 +53,9 @@ class IPXACTMODELS_EXPORT Transactional /*! * Set the all logical initiatives to allowed or disallowed. * - * @param [in] allLogicalInitiativesAllowed The new value to be set. + * @param [in] allow The new value to be set. */ - void setAllLogicalInitiativesAllowed(bool allLogicalInitiativesAllowed); + void setAllLogicalInitiativesAllowed(bool allow); /*! * Get the initiative. @@ -221,19 +214,12 @@ class IPXACTMODELS_EXPORT Transactional private: - /*! - * Copy the transactional type definitions. - * - * @param [in] other The target of the copying. - */ - void copyTransactionalTypeDefinitions(const Transactional& other); - //----------------------------------------------------------------------------- // Data. //----------------------------------------------------------------------------- //! Defines the allowed logical initiatives. - bool allLogicalInitiativesAllowed_; + bool allLogicalInitiativesAllowed_{ false }; //! Defines the type of access. QString initiative_; @@ -245,10 +231,11 @@ class IPXACTMODELS_EXPORT Transactional QString busWidth_; //! Defines the used protocol - QSharedPointer protocol_; + QSharedPointer protocol_{ nullptr }; //! Defines the port type expressed in the default language for this port. - QSharedPointer > > transTypeDefs_; + QSharedPointer > > transTypeDefs_{ + new QList >() }; //! Defines the maximum number of connections. QString maxConnections_; diff --git a/IPXACTmodels/Component/Wire.cpp b/IPXACTmodels/Component/Wire.cpp index f601ec7d6..16f55a551 100644 --- a/IPXACTmodels/Component/Wire.cpp +++ b/IPXACTmodels/Component/Wire.cpp @@ -13,48 +13,19 @@ #include +#include + #include #include #include #include -//----------------------------------------------------------------------------- -// Function: Wire::Wire() -//----------------------------------------------------------------------------- -Wire::Wire(): -direction_(DirectionTypes::DIRECTION_INVALID), -allLogicalDirectionsAllowed_(false), -vector_(), -wireTypeDefs_(new QList > ()), -defaultDriverValue_(), -defaultValueAttributes_() -{ - -} - -//----------------------------------------------------------------------------- -// Function: Wire::Wire() -//----------------------------------------------------------------------------- -Wire::Wire( DirectionTypes::Direction direction, int leftBound, int rightBound,QString const& defaultValue, - bool allLogicalDirections ): -direction_(direction), -allLogicalDirectionsAllowed_(allLogicalDirections), -vector_(), -wireTypeDefs_(new QList > ()), -defaultDriverValue_(defaultValue), -defaultValueAttributes_() -{ - vector_ = QSharedPointer(new Vector(QString::number(leftBound), QString::number(rightBound))); -} - //----------------------------------------------------------------------------- // Function: Wire() //----------------------------------------------------------------------------- Wire::Wire(Wire const& other) : direction_(other.direction_), allLogicalDirectionsAllowed_(other.allLogicalDirectionsAllowed_), -vector_(), -wireTypeDefs_(), defaultDriverValue_(other.defaultDriverValue_), defaultValueAttributes_(other.defaultValueAttributes_) { @@ -63,22 +34,13 @@ defaultValueAttributes_(other.defaultValueAttributes_) vector_ = QSharedPointer(new Vector(*other.vector_)); } - if (other.wireTypeDefs_) - { - wireTypeDefs_ = QSharedPointer > >( - new QList >()); - foreach (QSharedPointer typeDef, *other.wireTypeDefs_) - { - QSharedPointer copy = QSharedPointer(new WireTypeDef(*typeDef.data())); - wireTypeDefs_->append(copy); - } - } + Copy::copyList(other.wireTypeDefs_, wireTypeDefs_); } //----------------------------------------------------------------------------- // Function: Wire::operator=() //----------------------------------------------------------------------------- -Wire & Wire::operator=( const Wire &other ) +Wire& Wire::operator=( const Wire &other ) { if (this != &other) { @@ -91,39 +53,13 @@ Wire & Wire::operator=( const Wire &other ) { vector_ = QSharedPointer(new Vector(*other.vector_)); } - else - { - vector_ = QSharedPointer(); - } wireTypeDefs_.clear(); - if (other.wireTypeDefs_) - { - foreach (QSharedPointer typeDef, *other.wireTypeDefs_) - { - if (typeDef) - { - QSharedPointer copy = QSharedPointer(new WireTypeDef(*typeDef.data())); - wireTypeDefs_->append(copy); - } - } - } + Copy::copyList(other.wireTypeDefs_, wireTypeDefs_); } return *this; } -//----------------------------------------------------------------------------- -// Function: Wire::~Wire() -//----------------------------------------------------------------------------- -Wire::~Wire() -{ - if(vector_) - { - vector_.clear(); - } - wireTypeDefs_.clear(); -} - //----------------------------------------------------------------------------- // Function: Wire::getDirection() //----------------------------------------------------------------------------- @@ -135,7 +71,7 @@ DirectionTypes::Direction Wire::getDirection() const //----------------------------------------------------------------------------- // Function: Wire::getWireTypeDefs() //----------------------------------------------------------------------------- -QSharedPointer > > Wire::getWireTypeDefs() +QSharedPointer > > Wire::getWireTypeDefs() const { return wireTypeDefs_; } @@ -177,16 +113,15 @@ bool Wire::getAllLogicalDirectionsAllowed() const //----------------------------------------------------------------------------- void Wire::setWireTypeDefs(QSharedPointer > > newWireTypeDefs) { - wireTypeDefs_.clear(); wireTypeDefs_ = newWireTypeDefs; } //----------------------------------------------------------------------------- // Function: Wire::setAllLogicalDirectionsAllowed() //----------------------------------------------------------------------------- -void Wire::setAllLogicalDirectionsAllowed(bool allLogicalDirectionsAllowed) +void Wire::setAllLogicalDirectionsAllowed(bool allow) { - allLogicalDirectionsAllowed_ = allLogicalDirectionsAllowed; + allLogicalDirectionsAllowed_ = allow; } //----------------------------------------------------------------------------- @@ -234,11 +169,11 @@ void Wire::setVectorRightBound(QString const& expression) //----------------------------------------------------------------------------- // Function: wire::getLeftBoundExpression() //----------------------------------------------------------------------------- -QString Wire::getVectorLeftBound() +QString Wire::getVectorLeftBound() const { if (!vector_) { - vector_ = QSharedPointer(new Vector(QString(), QString())); + return QString(); } return vector_->getLeft(); @@ -247,11 +182,11 @@ QString Wire::getVectorLeftBound() //----------------------------------------------------------------------------- // Function: wire::getRightBoundExpression() //----------------------------------------------------------------------------- -QString Wire::getVectorRightBound() +QString Wire::getVectorRightBound() const { if (!vector_) { - vector_ = QSharedPointer(new Vector(QString(), QString())); + return QString(); } return vector_->getRight(); @@ -264,7 +199,7 @@ QString Wire::getTypeName(QString const& viewName) const { if (wireTypeDefs_) { - foreach (QSharedPointer wireTypeDefinition, *wireTypeDefs_) + for (QSharedPointer wireTypeDefinition : *wireTypeDefs_) { if (wireTypeDefinition->hasView(viewName)) { @@ -283,7 +218,7 @@ void Wire::setTypeName(QString const& typeName, QString const& viewName) { if (wireTypeDefs_) { - foreach (QSharedPointer wireTypeDefinition, *wireTypeDefs_) + for (QSharedPointer wireTypeDefinition : *wireTypeDefs_) { if (wireTypeDefinition->getViewRefs()->contains(viewName) || viewName.isEmpty()) { @@ -302,7 +237,8 @@ void Wire::setTypeName(QString const& typeName, QString const& viewName) if (!typeName.isEmpty()) { - QSharedPointer newWireTypeDefinition(new WireTypeDef(typeName, viewName)); + QSharedPointer newWireTypeDefinition(new WireTypeDef(typeName)); + newWireTypeDefinition->getViewRefs()->append(viewName); wireTypeDefs_->append(newWireTypeDefinition); } } @@ -310,11 +246,11 @@ void Wire::setTypeName(QString const& typeName, QString const& viewName) //----------------------------------------------------------------------------- // Function: Wire::getTypeDefinition() //----------------------------------------------------------------------------- -QString Wire::getTypeDefinition(QString const& typeName) +QString Wire::getTypeDefinition(QString const& typeName) const { if (wireTypeDefs_) { - foreach (QSharedPointer wireTypeDefinition, *wireTypeDefs_) + for (QSharedPointer wireTypeDefinition : *wireTypeDefs_) { if (wireTypeDefinition->getTypeName() == typeName) { @@ -334,9 +270,9 @@ QStringList Wire::getTypeDefinitions() const QStringList typeDefs; if (wireTypeDefs_) { - foreach (QSharedPointer wireTypeDefinition, *wireTypeDefs_) + for (QSharedPointer wireTypeDefinition : *wireTypeDefs_) { - foreach (QString singleDefinition, *wireTypeDefinition->getTypeDefinitions()) + for (QString singleDefinition : *wireTypeDefinition->getTypeDefinitions()) { typeDefs.append(singleDefinition); } @@ -352,7 +288,7 @@ void Wire::setTypeDefinition(QString const& typeName, QString const& typeDefinit { if (wireTypeDefs_) { - foreach (QSharedPointer wireTypeDefinition, *wireTypeDefs_) + for (QSharedPointer wireTypeDefinition : *wireTypeDefs_) { if (wireTypeDefinition->getTypeName() == typeName) { @@ -388,10 +324,10 @@ bool Wire::hasType(QString const& viewName) const return false; } - foreach (QSharedPointer wireTypeDefinition, *wireTypeDefs_) + for (QSharedPointer wireTypeDefinition : *wireTypeDefs_) { - if ((viewName.isEmpty() && !wireTypeDefinition->getTypeName().isEmpty()) || - (wireTypeDefinition->hasView(viewName) && !wireTypeDefinition->getTypeName().isEmpty())) + if (!wireTypeDefinition->getTypeName().isEmpty() && + (viewName.isEmpty() || wireTypeDefinition->hasView(viewName) )) { return true; } @@ -410,13 +346,8 @@ bool Wire::hasTypeDefinition() const return false; } - foreach(QSharedPointer wireTypeDefinition, *wireTypeDefs_) - { - if (!wireTypeDefinition->getTypeName().isEmpty() || !wireTypeDefinition->getTypeDefinitions()->isEmpty()) + return std::any_of(wireTypeDefs_->cbegin(), wireTypeDefs_->cend(), [](auto const& typeDefinition) { - return true; - } - } - - return false; + return !typeDefinition->getTypeName().isEmpty() || !typeDefinition->getTypeDefinitions()->isEmpty(); + }); } diff --git a/IPXACTmodels/Component/Wire.h b/IPXACTmodels/Component/Wire.h index 44f054e27..84ec48743 100644 --- a/IPXACTmodels/Component/Wire.h +++ b/IPXACTmodels/Component/Wire.h @@ -34,22 +34,8 @@ class IPXACTMODELS_EXPORT Wire public: - /*! - * The default constructor. - */ - Wire(); - - /*! - * The constructor. - * - * @param [in] direction Direction of the port. - * @param [in] leftBound Left bound of the port. - * @param [in] rightBound Right bound of the port. - * @param [in] defaultValue Default value of the port. - * @param [in] allLogicalDirections Specifies allowed logical directions. - */ - Wire(DirectionTypes::Direction direction, int leftBound, int rightBound, const QString& defaultValue, - bool allLogicalDirections); + //! The default constructor. + Wire() = default; /*! * Copy constructor. @@ -64,7 +50,7 @@ class IPXACTMODELS_EXPORT Wire /*! * The destructor. */ - ~Wire(); + ~Wire() = default; /*! * Get the value of all logical directions allowed element. @@ -92,14 +78,14 @@ class IPXACTMODELS_EXPORT Wire * * @return Pointer to a list containing wire type definitions. */ - QSharedPointer > > getWireTypeDefs(); + QSharedPointer > > getWireTypeDefs() const; /*! * Allow / disallow all logical directions allowed value for this port. * - * @param [in] allLogicalDirectionsAllowed The allowed status. + * @param [in] allow The allowed status. */ - void setAllLogicalDirectionsAllowed(bool allLogicalDirectionsAllowed); + void setAllLogicalDirectionsAllowed(bool allow); /*! * Set the direction of this port. @@ -155,14 +141,14 @@ class IPXACTMODELS_EXPORT Wire * * @return The expression. */ - QString getVectorLeftBound(); + QString getVectorLeftBound() const; /*! * Get the right bound expression. * * @return The expression. */ - QString getVectorRightBound(); + QString getVectorRightBound() const; /*! * Get the type name of the port for a given view. @@ -171,7 +157,7 @@ class IPXACTMODELS_EXPORT Wire * * @return The required type name. */ - QString getTypeName(const QString& viewName = QLatin1String("")) const; + QString getTypeName(const QString& viewName = QString()) const; /*! * Check if the wire has a type name in given view. @@ -195,7 +181,7 @@ class IPXACTMODELS_EXPORT Wire * @param [in] typeName The name of the type. * @param [in] viewName The name of the view used for this type. */ - void setTypeName(const QString& typeName, const QString& viewName = QLatin1String("")); + void setTypeName(const QString& typeName, const QString& viewName = QString()); /*! * Get the type definition of the given type name. @@ -204,7 +190,7 @@ class IPXACTMODELS_EXPORT Wire * * @return The required type definition. */ - QString getTypeDefinition(const QString& typeName); + QString getTypeDefinition(const QString& typeName) const; /*! * Get the type definition. @@ -224,16 +210,16 @@ class IPXACTMODELS_EXPORT Wire private: //! The direction of the port. - DirectionTypes::Direction direction_; + DirectionTypes::Direction direction_{ DirectionTypes::DIRECTION_INVALID }; //! Defines whether the port may be mapped to a port in an abstraction definition with a different direction. - bool allLogicalDirectionsAllowed_; + bool allLogicalDirectionsAllowed_{ false }; //! Determines the vector qualities of the port. - QSharedPointer vector_; + QSharedPointer vector_{ nullptr }; //! Describes the ports type as defined bu the implementation. - QSharedPointer > > wireTypeDefs_; + QSharedPointer > > wireTypeDefs_{ new QList > }; //! Specifies a static logic value for this port. QString defaultDriverValue_; diff --git a/IPXACTmodels/Component/WireTypeDef.cpp b/IPXACTmodels/Component/WireTypeDef.cpp index 080a294a4..e5845d417 100644 --- a/IPXACTmodels/Component/WireTypeDef.cpp +++ b/IPXACTmodels/Component/WireTypeDef.cpp @@ -14,16 +14,10 @@ //----------------------------------------------------------------------------- // Function: WireTypeDef::WireTypeDef() //----------------------------------------------------------------------------- -WireTypeDef::WireTypeDef(const QString& typeName, const QString& viewNameRef) : -typeName_(typeName), -constrained_(false), -typeDefinitions_(new QStringList()), -viewNameRefs_(new QStringList()) +WireTypeDef::WireTypeDef(const QString& typeName) : +typeName_(typeName) { - if (!viewNameRef.isEmpty()) - { - viewNameRefs_->append(viewNameRef); - } + } //----------------------------------------------------------------------------- @@ -31,12 +25,10 @@ viewNameRefs_(new QStringList()) //----------------------------------------------------------------------------- WireTypeDef::WireTypeDef(const WireTypeDef& other) : typeName_(other.typeName_), -constrained_(other.constrained_), -typeDefinitions_(new QStringList()), -viewNameRefs_(new QStringList()) +constrained_(other.constrained_) { - copyTypeDefinitions(other.typeDefinitions_); - copyViewNameReferences(other.viewNameRefs_); + copyTypeDefinitions(*other.typeDefinitions_); + copyViewNameReferences(*other.viewNameRefs_); } //----------------------------------------------------------------------------- @@ -48,66 +40,23 @@ WireTypeDef& WireTypeDef::operator=(const WireTypeDef& other) { typeName_ = other.typeName_; constrained_ = other.constrained_; - typeDefinitions_ = other.typeDefinitions_; typeDefinitions_->clear(); - viewNameRefs_->clear(); - - copyTypeDefinitions(other.typeDefinitions_); - copyViewNameReferences(other.viewNameRefs_); - } - return *this; -} + copyTypeDefinitions(*other.typeDefinitions_); -//----------------------------------------------------------------------------- -// Function: WireTypeDef::copyTypeDefinitions() -//----------------------------------------------------------------------------- -void WireTypeDef::copyTypeDefinitions(QSharedPointer newTypeDefinitions) -{ - foreach (QString definition, *newTypeDefinitions) - { - typeDefinitions_->append(definition); - } -} - -//----------------------------------------------------------------------------- -// Function: WireTypeDef::copyViewNameReferences() -//----------------------------------------------------------------------------- -void WireTypeDef::copyViewNameReferences(QSharedPointer newViewReferences) -{ - foreach (QString viewReference, *newViewReferences) - { - viewNameRefs_->append(viewReference); + viewNameRefs_->clear(); + copyViewNameReferences(*other.viewNameRefs_); } -} - -//----------------------------------------------------------------------------- -// Function: WireTypeDef::~WireTypeDef() -//----------------------------------------------------------------------------- -WireTypeDef::~WireTypeDef() -{ + return *this; } //----------------------------------------------------------------------------- // Function: WireTypeDef::hasView() //----------------------------------------------------------------------------- -bool WireTypeDef::hasView(QString const& viewName) +bool WireTypeDef::hasView(QString const& viewName) const { - // Is this truly necessary? - if (viewName.isEmpty()) - { - return true; - } - - foreach (QString viewReference, *viewNameRefs_) - { - if (viewReference == viewName) - { - return true; - } - } - return false; + return (viewName.isEmpty() && viewNameRefs_->isEmpty()) || viewNameRefs_->contains(viewName); } //----------------------------------------------------------------------------- @@ -172,4 +121,26 @@ QSharedPointer WireTypeDef::getViewRefs() const void WireTypeDef::setViewRefs(QSharedPointer newViewRefs) { viewNameRefs_ = newViewRefs; -} \ No newline at end of file +} + +//----------------------------------------------------------------------------- +// Function: WireTypeDef::copyTypeDefinitions() +//----------------------------------------------------------------------------- +void WireTypeDef::copyTypeDefinitions(QStringList const& newTypeDefinitions) +{ + for (auto const& definition : newTypeDefinitions) + { + typeDefinitions_->append(definition); + } +} + +//----------------------------------------------------------------------------- +// Function: WireTypeDef::copyViewNameReferences() +//----------------------------------------------------------------------------- +void WireTypeDef::copyViewNameReferences(QStringList const& newViewReferences) +{ + for (auto const& viewReference : newViewReferences) + { + viewNameRefs_->append(viewReference); + } +} diff --git a/IPXACTmodels/Component/WireTypeDef.h b/IPXACTmodels/Component/WireTypeDef.h index 841fdb015..6a318adc2 100644 --- a/IPXACTmodels/Component/WireTypeDef.h +++ b/IPXACTmodels/Component/WireTypeDef.h @@ -30,24 +30,33 @@ class IPXACTMODELS_EXPORT WireTypeDef * The constructor. * * @param [in] typeName The type name for the wire type definition. - * @param [in] viewNameRef The name of the referenced view. */ - WireTypeDef(const QString& typeName = QString(), const QString& viewNameRef = QString()); + explicit WireTypeDef(const QString& typeName = QString()); /*! * The copy constructor. */ WireTypeDef(const WireTypeDef& other); + + /*! + * The move constructor. + */ + WireTypeDef(WireTypeDef&& other) = default; /*! * Assignment operator. */ WireTypeDef& operator=(const WireTypeDef& other); + /*! + * Move assignment operator. + */ + WireTypeDef& operator=(WireTypeDef&& other) = default; + /*! * The destructor. */ - ~WireTypeDef(); + ~WireTypeDef() = default; /*! * Check if a wire type definition has been determined for a given view. @@ -56,7 +65,7 @@ class IPXACTMODELS_EXPORT WireTypeDef * * @return True, if the view is found within a view name reference. */ - bool hasView(QString const& viewName); + bool hasView(QString const& viewName) const; /*! * Get the type name. @@ -121,14 +130,14 @@ class IPXACTMODELS_EXPORT WireTypeDef * * @param [in] newTypeDefinitions List of new type definitions. */ - void copyTypeDefinitions(QSharedPointer newTypeDefinitions); + void copyTypeDefinitions(QStringList const& newTypeDefinitions); /*! * Copy the view references. * * @param [in] newViewReferences List of new view references. */ - void copyViewNameReferences(QSharedPointer newViewReferences); + void copyViewNameReferences(QStringList const& newViewReferences); //----------------------------------------------------------------------------- // Data. @@ -138,13 +147,13 @@ class IPXACTMODELS_EXPORT WireTypeDef QString typeName_; //! Indicates whether or not the number of bits in the type declaration is fixed or not. - bool constrained_; + bool constrained_{ false }; //! Contains language specific reference to where given type is actually defined. - QSharedPointer typeDefinitions_; + QSharedPointer typeDefinitions_{ new QStringList() }; //! Indicates the view or views in which this type definition applies. - QSharedPointer viewNameRefs_; + QSharedPointer viewNameRefs_{ new QStringList() }; }; #endif // WIRETYPEDEF_H diff --git a/IPXACTmodels/IPXACTmodels.pri b/IPXACTmodels/IPXACTmodels.pri index 306d832f9..35ff83ec2 100644 --- a/IPXACTmodels/IPXACTmodels.pri +++ b/IPXACTmodels/IPXACTmodels.pri @@ -289,6 +289,7 @@ HEADERS += ./generaldeclarations.h \ ./Catalog/CatalogWriter.h \ ./Catalog/validators/CatalogValidator.h \ ./utilities/BusDefinitionUtils.h \ + ./utilities/Copy.h \ ./utilities/XmlUtils.h \ ./DesignConfiguration/AbstractorInstance.h \ ./DesignConfiguration/DesignConfiguration.h \ @@ -300,8 +301,7 @@ HEADERS += ./generaldeclarations.h \ ./DesignConfiguration/ViewConfiguration.h \ ./DesignConfiguration/validators/DesignConfigurationValidator.h \ ./DesignConfiguration/validators/InterconnectionConfigurationValidator.h \ - ./DesignConfiguration/validators/ViewConfigurationValidator.h \ - ./utilities/Copy.h + ./DesignConfiguration/validators/ViewConfigurationValidator.h SOURCES += ./generaldeclarations.cpp \ ./kactusExtensions/ApiDefinition.cpp \ ./kactusExtensions/ApiDefinitionReader.cpp \ @@ -333,7 +333,6 @@ SOURCES += ./generaldeclarations.cpp \ ./kactusExtensions/validators/SystemDesignConfigurationValidator.cpp \ ./kactusExtensions/validators/SystemViewConfigurationValidator.cpp \ ./common/AccessTypes.cpp \ - ./common/Array.cpp \ ./common/Assertion.cpp \ ./common/BooleanValue.cpp \ ./common/BuildModel.cpp \ diff --git a/IPXACTmodels/IPXACTmodels.vcxproj b/IPXACTmodels/IPXACTmodels.vcxproj index 5e4b7c6fd..6f549f98f 100644 --- a/IPXACTmodels/IPXACTmodels.vcxproj +++ b/IPXACTmodels/IPXACTmodels.vcxproj @@ -144,7 +144,6 @@ - diff --git a/IPXACTmodels/IPXACTmodels.vcxproj.filters b/IPXACTmodels/IPXACTmodels.vcxproj.filters index b53bf03db..18a6ae037 100644 --- a/IPXACTmodels/IPXACTmodels.vcxproj.filters +++ b/IPXACTmodels/IPXACTmodels.vcxproj.filters @@ -497,9 +497,6 @@ Source Files\Component - - Source Files\common - Source Files\common diff --git a/IPXACTmodels/common/Array.h b/IPXACTmodels/common/Array.h index aca2faf3f..3649efc22 100644 --- a/IPXACTmodels/common/Array.h +++ b/IPXACTmodels/common/Array.h @@ -12,56 +12,8 @@ #ifndef ARRAY_H #define ARRAY_H -#include "Range.h" +#include "Vector.h" -#include +using Array = Vector; -#include -#include - -//----------------------------------------------------------------------------- -// Kactus2 vendor extension for arrays. -//----------------------------------------------------------------------------- -class IPXACTMODELS_EXPORT Array : public Range -{ -public: - - /*! - * The constructor. - * - * @param [in] left The left side of the array. - * @param [in] right The right side of the array. - */ - Array(QString left, QString right); - - /*! - * The destructor. - */ - virtual ~Array(); - - //! Disable copying. - Array(Array const& other); - - // Disable assignment. - Array& operator=(Array const& other); - - /*! - * Set the array id. - * - * @param [in] id The new array id. - */ - void setId(QString const& id); - - /*! - * Get the array id. - * - * @return The array id. - */ - QString getId() const; - -private: - - //! Name for referencing the array. - QString arrayId_; -}; #endif // ARRAY_H diff --git a/IPXACTmodels/common/Protocol.cpp b/IPXACTmodels/common/Protocol.cpp index 9c57458ee..e003841d5 100644 --- a/IPXACTmodels/common/Protocol.cpp +++ b/IPXACTmodels/common/Protocol.cpp @@ -11,20 +11,6 @@ #include "Protocol.h" -//----------------------------------------------------------------------------- -// Function: Protocol::Protocol() -//----------------------------------------------------------------------------- -Protocol::Protocol() : Extendable(), -protocolType_(), - customProtocolType_(), - payloadName_(), - payloadType_(), - payloadExtension_(), - mandatoryPayloadExtension_(false) -{ - -} - //----------------------------------------------------------------------------- // Function: Protocol::setType() //----------------------------------------------------------------------------- @@ -122,4 +108,3 @@ bool Protocol::hasMandatoryPayloadExtension() const { return mandatoryPayloadExtension_; } - diff --git a/IPXACTmodels/common/Protocol.h b/IPXACTmodels/common/Protocol.h index 376e5aa56..528fdcf57 100644 --- a/IPXACTmodels/common/Protocol.h +++ b/IPXACTmodels/common/Protocol.h @@ -25,18 +25,9 @@ class IPXACTMODELS_EXPORT Protocol : public Extendable { public: - //! The constructor. - Protocol(); - //! The destructor. ~Protocol() = default; - //! Copy constructor. - Protocol(Protocol const& other) = default; - - // Disable copying. - Protocol& operator=(Protocol const& rhs) = delete; - /*! * Sets the protocol type. * @@ -128,7 +119,7 @@ class IPXACTMODELS_EXPORT Protocol : public Extendable QString payloadExtension_; //! Specifies if the payload extension is mandatory or not. - bool mandatoryPayloadExtension_; + bool mandatoryPayloadExtension_{ false }; }; #endif // PROTOCOL_H diff --git a/IPXACTmodels/common/Range.cpp b/IPXACTmodels/common/Range.cpp index 5a3a79c05..ad3b18835 100644 --- a/IPXACTmodels/common/Range.cpp +++ b/IPXACTmodels/common/Range.cpp @@ -20,38 +20,6 @@ left_(left), right_(right) } -//----------------------------------------------------------------------------- -// Function: Range::Range() -//----------------------------------------------------------------------------- -Range::Range(Range const& other): - left_(other.left_), - right_(other.right_) -{ - -} - -//----------------------------------------------------------------------------- -// Function: Range::operator=() -//----------------------------------------------------------------------------- -Range& Range::operator=(Range const& other) -{ - if (this != &other) - { - left_ = other.left_; - right_ = other.right_; - } - - return *this; -} - -//----------------------------------------------------------------------------- -// Function: Range::~Range() -//----------------------------------------------------------------------------- -Range::~Range() -{ - -} - //----------------------------------------------------------------------------- // Function: Range::getLeft() //----------------------------------------------------------------------------- diff --git a/IPXACTmodels/common/Range.h b/IPXACTmodels/common/Range.h index af8c342bc..b45412841 100644 --- a/IPXACTmodels/common/Range.h +++ b/IPXACTmodels/common/Range.h @@ -27,11 +27,7 @@ class IPXACTMODELS_EXPORT Range Range(QString const& left, QString const& right); //! The destructor. - virtual ~Range(); - - Range(Range const& other); - - Range& operator=(Range const& other); + virtual ~Range() = default; /*! * Gets the left value of the range. diff --git a/IPXACTmodels/common/Vector.cpp b/IPXACTmodels/common/Vector.cpp index 9096a9037..396452076 100644 --- a/IPXACTmodels/common/Vector.cpp +++ b/IPXACTmodels/common/Vector.cpp @@ -14,41 +14,10 @@ //----------------------------------------------------------------------------- // Function: Vector::Vector() //----------------------------------------------------------------------------- -Vector::Vector(QString left, QString right): +Vector::Vector(QString const& left, QString const& right): Range(left, right) { -} -//----------------------------------------------------------------------------- -// Function: Vector::Vector() -//----------------------------------------------------------------------------- -Vector::Vector(Vector const& other): -Range(other.getLeft(), other.getRight()), -vectorId_(other.vectorId_) -{ - -} - -//----------------------------------------------------------------------------- -// Function: Vector::operator=() -//----------------------------------------------------------------------------- -Vector& Vector::operator=(Vector const& other) -{ - if (this != &other) - { - Range::operator=(other); - vectorId_ = other.vectorId_; - } - - return *this; -} - -//----------------------------------------------------------------------------- -// Function: Vector::~Vector() -//----------------------------------------------------------------------------- -Vector::~Vector() -{ - } //----------------------------------------------------------------------------- diff --git a/IPXACTmodels/common/Vector.h b/IPXACTmodels/common/Vector.h index 55881dcab..a944b382b 100644 --- a/IPXACTmodels/common/Vector.h +++ b/IPXACTmodels/common/Vector.h @@ -31,19 +31,11 @@ class IPXACTMODELS_EXPORT Vector : public Range * @param [in] left The left side of the vector. * @param [in] right The right side of the vector. */ - Vector(QString left, QString right); + Vector(QString const& left, QString const& right); + + //! The destructor. + ~Vector() = default; - //! Copy constructor. - Vector(Vector const& other); - - // Assignment. - Vector& operator=(Vector const& other); - - /*! - * The destructor. - */ - virtual ~Vector(); - /*! * Sets the vector id. * diff --git a/version.h b/version.h index 27b91f92a..a3fe1dc63 100644 --- a/version.h +++ b/version.h @@ -10,20 +10,20 @@ #ifndef VERSIONNO__H #define VERSIONNO__H -#define VERSION_FULL 3.12.919.0 +#define VERSION_FULL 3.12.923.0 #define VERSION_BASEYEAR 0 -#define VERSION_DATE "2023-11-03" -#define VERSION_TIME "14:04:15" +#define VERSION_DATE "2023-11-06" +#define VERSION_TIME "16:09:34" #define VERSION_MAJOR 3 #define VERSION_MINOR 12 -#define VERSION_BUILDNO 919 +#define VERSION_BUILDNO 923 #define VERSION_EXTEND 0 -#define VERSION_FILE 3,12,919,0 -#define VERSION_PRODUCT 3,12,919,0 -#define VERSION_FILESTR "3,12,919,0" -#define VERSION_PRODUCTSTR "3,12,919,0" +#define VERSION_FILE 3,12,923,0 +#define VERSION_PRODUCT 3,12,923,0 +#define VERSION_FILESTR "3,12,923,0" +#define VERSION_PRODUCTSTR "3,12,923,0" #endif