diff options
Diffstat (limited to 'src/uml/qobjects/qumlsubstitutionobject.cpp')
-rw-r--r-- | src/uml/qobjects/qumlsubstitutionobject.cpp | 231 |
1 files changed, 153 insertions, 78 deletions
diff --git a/src/uml/qobjects/qumlsubstitutionobject.cpp b/src/uml/qobjects/qumlsubstitutionobject.cpp index 3561e082..950feb05 100644 --- a/src/uml/qobjects/qumlsubstitutionobject.cpp +++ b/src/uml/qobjects/qumlsubstitutionobject.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ #include "qumlsubstitutionobject_p.h" +#include "private/qmodelingobject_p.h" #include <QtUml/QUmlSubstitution> #include <QtUml/QUmlClassifier> @@ -55,16 +56,18 @@ QT_BEGIN_NAMESPACE -QUmlSubstitutionObject::QUmlSubstitutionObject(QUmlSubstitution *qModelingObject) +QUmlSubstitutionObject::QUmlSubstitutionObject(QUmlSubstitution *qModelingElement) { - setProperty("modelingObject", QVariant::fromValue(static_cast<QModelingObject *>(qModelingObject))); + setProperty("modelingElement", QVariant::fromValue(static_cast<QModelingElement *>(qModelingElement))); + setGroupProperties(); + setPropertyData(); } QUmlSubstitutionObject::~QUmlSubstitutionObject() { if (!property("deletingFromModelingObject").isValid()) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->deletingFromQObject = true; - delete qmodelingobjectproperty_cast<QUmlComment *>(this); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->deletingFromQModelingObject = true; + delete qmodelingelementproperty_cast<QUmlComment *>(this); } } @@ -73,43 +76,43 @@ QUmlSubstitutionObject::~QUmlSubstitutionObject() const QSet<QObject *> QUmlSubstitutionObject::ownedComments() const { QSet<QObject *> set; - foreach (QUmlComment *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->ownedComments()) - set.insert(element->asQObject()); + foreach (QUmlComment *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->ownedComments()) + set.insert(element->asQModelingObject()); return set; } const QSet<QObject *> QUmlSubstitutionObject::ownedElements() const { QSet<QObject *> set; - foreach (QUmlElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->ownedElements()) - set.insert(element->asQObject()); + foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->ownedElements()) + set.insert(element->asQModelingObject()); return set; } QObject *QUmlSubstitutionObject::owner() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->owner()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->owner()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->owner()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->owner()->asQModelingObject(); } // OWNED ATTRIBUTES [ParameterableElement] QObject *QUmlSubstitutionObject::owningTemplateParameter() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->owningTemplateParameter()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->owningTemplateParameter()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->owningTemplateParameter()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->owningTemplateParameter()->asQModelingObject(); } QObject *QUmlSubstitutionObject::templateParameter() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->templateParameter()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->templateParameter()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->templateParameter()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->templateParameter()->asQModelingObject(); } // OWNED ATTRIBUTES [NamedElement] @@ -117,42 +120,42 @@ QObject *QUmlSubstitutionObject::templateParameter() const const QSet<QObject *> QUmlSubstitutionObject::clientDependencies() const { QSet<QObject *> set; - foreach (QUmlDependency *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->clientDependencies()) - set.insert(element->asQObject()); + foreach (QUmlDependency *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->clientDependencies()) + set.insert(element->asQModelingObject()); return set; } QString QUmlSubstitutionObject::name() const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->name(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->name(); } QObject *QUmlSubstitutionObject::nameExpression() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->nameExpression()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->nameExpression()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->nameExpression()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->nameExpression()->asQModelingObject(); } QObject *QUmlSubstitutionObject::namespace_() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->namespace_()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->namespace_()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->namespace_()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->namespace_()->asQModelingObject(); } QString QUmlSubstitutionObject::qualifiedName() const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->qualifiedName(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->qualifiedName(); } // OWNED ATTRIBUTES [PackageableElement] QtUml::VisibilityKind QUmlSubstitutionObject::visibility() const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->visibility(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->visibility(); } // OWNED ATTRIBUTES [Relationship] @@ -160,8 +163,8 @@ QtUml::VisibilityKind QUmlSubstitutionObject::visibility() const const QSet<QObject *> QUmlSubstitutionObject::relatedElements() const { QSet<QObject *> set; - foreach (QUmlElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->relatedElements()) - set.insert(element->asQObject()); + foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->relatedElements()) + set.insert(element->asQModelingObject()); return set; } @@ -170,16 +173,16 @@ const QSet<QObject *> QUmlSubstitutionObject::relatedElements() const const QSet<QObject *> QUmlSubstitutionObject::sources() const { QSet<QObject *> set; - foreach (QUmlElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->sources()) - set.insert(element->asQObject()); + foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->sources()) + set.insert(element->asQModelingObject()); return set; } const QSet<QObject *> QUmlSubstitutionObject::targets() const { QSet<QObject *> set; - foreach (QUmlElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->targets()) - set.insert(element->asQObject()); + foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->targets()) + set.insert(element->asQModelingObject()); return set; } @@ -188,16 +191,16 @@ const QSet<QObject *> QUmlSubstitutionObject::targets() const const QSet<QObject *> QUmlSubstitutionObject::clients() const { QSet<QObject *> set; - foreach (QUmlNamedElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->clients()) - set.insert(element->asQObject()); + foreach (QUmlNamedElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->clients()) + set.insert(element->asQModelingObject()); return set; } const QSet<QObject *> QUmlSubstitutionObject::suppliers() const { QSet<QObject *> set; - foreach (QUmlNamedElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->suppliers()) - set.insert(element->asQObject()); + foreach (QUmlNamedElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->suppliers()) + set.insert(element->asQModelingObject()); return set; } @@ -205,28 +208,28 @@ const QSet<QObject *> QUmlSubstitutionObject::suppliers() const QObject *QUmlSubstitutionObject::mapping() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->mapping()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->mapping()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->mapping()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->mapping()->asQModelingObject(); } // OWNED ATTRIBUTES [Substitution] QObject *QUmlSubstitutionObject::contract() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->contract()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->contract()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->contract()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->contract()->asQModelingObject(); } QObject *QUmlSubstitutionObject::substitutingClassifier() const { - if (!qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->substitutingClassifier()) + if (!qmodelingelementproperty_cast<QUmlSubstitution *>(this)->substitutingClassifier()) return 0; else - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->substitutingClassifier()->asQObject(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->substitutingClassifier()->asQModelingObject(); } // OPERATIONS [Element] @@ -234,26 +237,26 @@ QObject *QUmlSubstitutionObject::substitutingClassifier() const QSet<QObject *> QUmlSubstitutionObject::allOwnedElements() const { QSet<QObject *> set; - foreach (QUmlElement *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->allOwnedElements()) - set.insert(element->asQObject()); + foreach (QUmlElement *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->allOwnedElements()) + set.insert(element->asQModelingObject()); return set; } bool QUmlSubstitutionObject::mustBeOwned() const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->mustBeOwned(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->mustBeOwned(); } // OPERATIONS [ParameterableElement] bool QUmlSubstitutionObject::isCompatibleWith(QObject *p) const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->isCompatibleWith(qmodelingobjectproperty_cast<QUmlParameterableElement *>(p)); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->isCompatibleWith(qmodelingelementproperty_cast<QUmlParameterableElement *>(p)); } bool QUmlSubstitutionObject::isTemplateParameter() const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->isTemplateParameter(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->isTemplateParameter(); } // OPERATIONS [NamedElement] @@ -261,184 +264,256 @@ bool QUmlSubstitutionObject::isTemplateParameter() const QList<QObject *> QUmlSubstitutionObject::allNamespaces() const { QList<QObject *> set; - foreach (QUmlNamespace *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->allNamespaces()) - set.append(element->asQObject()); + foreach (QUmlNamespace *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->allNamespaces()) + set.append(element->asQModelingObject()); return set; } QSet<QObject *> QUmlSubstitutionObject::allOwningPackages() const { QSet<QObject *> set; - foreach (QUmlPackage *element, qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->allOwningPackages()) - set.insert(element->asQObject()); + foreach (QUmlPackage *element, qmodelingelementproperty_cast<QUmlSubstitution *>(this)->allOwningPackages()) + set.insert(element->asQModelingObject()); return set; } bool QUmlSubstitutionObject::isDistinguishableFrom(QObject *n, QObject *ns) const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->isDistinguishableFrom(qmodelingobjectproperty_cast<QUmlNamedElement *>(n), qmodelingobjectproperty_cast<QUmlNamespace *>(ns)); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->isDistinguishableFrom(qmodelingelementproperty_cast<QUmlNamedElement *>(n), qmodelingelementproperty_cast<QUmlNamespace *>(ns)); } QString QUmlSubstitutionObject::separator() const { - return qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->separator(); + return qmodelingelementproperty_cast<QUmlSubstitution *>(this)->separator(); } // SLOTS FOR OWNED ATTRIBUTES [Element] void QUmlSubstitutionObject::addOwnedComment(QObject *ownedComment) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addOwnedComment(qmodelingobjectproperty_cast<QUmlComment *>(ownedComment)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addOwnedComment(qmodelingelementproperty_cast<QUmlComment *>(ownedComment)); } void QUmlSubstitutionObject::removeOwnedComment(QObject *ownedComment) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeOwnedComment(qmodelingobjectproperty_cast<QUmlComment *>(ownedComment)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeOwnedComment(qmodelingelementproperty_cast<QUmlComment *>(ownedComment)); } void QUmlSubstitutionObject::addOwnedElement(QObject *ownedElement) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addOwnedElement(qmodelingobjectproperty_cast<QUmlElement *>(ownedElement)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addOwnedElement(qmodelingelementproperty_cast<QUmlElement *>(ownedElement)); } void QUmlSubstitutionObject::removeOwnedElement(QObject *ownedElement) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeOwnedElement(qmodelingobjectproperty_cast<QUmlElement *>(ownedElement)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeOwnedElement(qmodelingelementproperty_cast<QUmlElement *>(ownedElement)); } void QUmlSubstitutionObject::setOwner(QObject *owner) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setOwner(qmodelingobjectproperty_cast<QUmlElement *>(owner)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setOwner(qmodelingelementproperty_cast<QUmlElement *>(owner)); } // SLOTS FOR OWNED ATTRIBUTES [ParameterableElement] void QUmlSubstitutionObject::setOwningTemplateParameter(QObject *owningTemplateParameter) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setOwningTemplateParameter(qmodelingobjectproperty_cast<QUmlTemplateParameter *>(owningTemplateParameter)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setOwningTemplateParameter(qmodelingelementproperty_cast<QUmlTemplateParameter *>(owningTemplateParameter)); } void QUmlSubstitutionObject::setTemplateParameter(QObject *templateParameter) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setTemplateParameter(qmodelingobjectproperty_cast<QUmlTemplateParameter *>(templateParameter)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setTemplateParameter(qmodelingelementproperty_cast<QUmlTemplateParameter *>(templateParameter)); } // SLOTS FOR OWNED ATTRIBUTES [NamedElement] void QUmlSubstitutionObject::addClientDependency(QObject *clientDependency) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addClientDependency(qmodelingobjectproperty_cast<QUmlDependency *>(clientDependency)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addClientDependency(qmodelingelementproperty_cast<QUmlDependency *>(clientDependency)); } void QUmlSubstitutionObject::removeClientDependency(QObject *clientDependency) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeClientDependency(qmodelingobjectproperty_cast<QUmlDependency *>(clientDependency)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeClientDependency(qmodelingelementproperty_cast<QUmlDependency *>(clientDependency)); } void QUmlSubstitutionObject::setName(QString name) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setName(name); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setName(name); } void QUmlSubstitutionObject::setNameExpression(QObject *nameExpression) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setNameExpression(qmodelingobjectproperty_cast<QUmlStringExpression *>(nameExpression)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setNameExpression(qmodelingelementproperty_cast<QUmlStringExpression *>(nameExpression)); } void QUmlSubstitutionObject::setNamespace(QObject *namespace_) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setNamespace(qmodelingobjectproperty_cast<QUmlNamespace *>(namespace_)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setNamespace(qmodelingelementproperty_cast<QUmlNamespace *>(namespace_)); } void QUmlSubstitutionObject::setQualifiedName(QString qualifiedName) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setQualifiedName(qualifiedName); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setQualifiedName(qualifiedName); } // SLOTS FOR OWNED ATTRIBUTES [PackageableElement] void QUmlSubstitutionObject::setVisibility(QtUml::VisibilityKind visibility) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setVisibility(visibility); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setVisibility(visibility); } void QUmlSubstitutionObject::unsetVisibility() { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->modifiedResettableProperties().removeAll(QStringLiteral("visibility")); + Q_D(QModelingObject); + d->modifiedResettableProperties.removeAll(QStringLiteral("visibility")); } // SLOTS FOR OWNED ATTRIBUTES [Relationship] void QUmlSubstitutionObject::addRelatedElement(QObject *relatedElement) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addRelatedElement(qmodelingobjectproperty_cast<QUmlElement *>(relatedElement)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addRelatedElement(qmodelingelementproperty_cast<QUmlElement *>(relatedElement)); } void QUmlSubstitutionObject::removeRelatedElement(QObject *relatedElement) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeRelatedElement(qmodelingobjectproperty_cast<QUmlElement *>(relatedElement)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeRelatedElement(qmodelingelementproperty_cast<QUmlElement *>(relatedElement)); } // SLOTS FOR OWNED ATTRIBUTES [DirectedRelationship] void QUmlSubstitutionObject::addSource(QObject *source) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addSource(qmodelingobjectproperty_cast<QUmlElement *>(source)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addSource(qmodelingelementproperty_cast<QUmlElement *>(source)); } void QUmlSubstitutionObject::removeSource(QObject *source) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeSource(qmodelingobjectproperty_cast<QUmlElement *>(source)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeSource(qmodelingelementproperty_cast<QUmlElement *>(source)); } void QUmlSubstitutionObject::addTarget(QObject *target) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addTarget(qmodelingobjectproperty_cast<QUmlElement *>(target)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addTarget(qmodelingelementproperty_cast<QUmlElement *>(target)); } void QUmlSubstitutionObject::removeTarget(QObject *target) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeTarget(qmodelingobjectproperty_cast<QUmlElement *>(target)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeTarget(qmodelingelementproperty_cast<QUmlElement *>(target)); } // SLOTS FOR OWNED ATTRIBUTES [Dependency] void QUmlSubstitutionObject::addClient(QObject *client) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addClient(qmodelingobjectproperty_cast<QUmlNamedElement *>(client)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addClient(qmodelingelementproperty_cast<QUmlNamedElement *>(client)); } void QUmlSubstitutionObject::removeClient(QObject *client) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeClient(qmodelingobjectproperty_cast<QUmlNamedElement *>(client)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeClient(qmodelingelementproperty_cast<QUmlNamedElement *>(client)); } void QUmlSubstitutionObject::addSupplier(QObject *supplier) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->addSupplier(qmodelingobjectproperty_cast<QUmlNamedElement *>(supplier)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->addSupplier(qmodelingelementproperty_cast<QUmlNamedElement *>(supplier)); } void QUmlSubstitutionObject::removeSupplier(QObject *supplier) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->removeSupplier(qmodelingobjectproperty_cast<QUmlNamedElement *>(supplier)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->removeSupplier(qmodelingelementproperty_cast<QUmlNamedElement *>(supplier)); } // SLOTS FOR OWNED ATTRIBUTES [Abstraction] void QUmlSubstitutionObject::setMapping(QObject *mapping) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setMapping(qmodelingobjectproperty_cast<QUmlOpaqueExpression *>(mapping)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setMapping(qmodelingelementproperty_cast<QUmlOpaqueExpression *>(mapping)); } // SLOTS FOR OWNED ATTRIBUTES [Substitution] void QUmlSubstitutionObject::setContract(QObject *contract) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setContract(qmodelingobjectproperty_cast<QUmlClassifier *>(contract)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setContract(qmodelingelementproperty_cast<QUmlClassifier *>(contract)); } void QUmlSubstitutionObject::setSubstitutingClassifier(QObject *substitutingClassifier) { - qmodelingobjectproperty_cast<QUmlSubstitution *>(this)->setSubstitutingClassifier(qmodelingobjectproperty_cast<QUmlClassifier *>(substitutingClassifier)); + qmodelingelementproperty_cast<QUmlSubstitution *>(this)->setSubstitutingClassifier(qmodelingelementproperty_cast<QUmlClassifier *>(substitutingClassifier)); +} + + +void QUmlSubstitutionObject::setGroupProperties() +{ + Q_D(QModelingObject); + const QMetaObject *metaObject = this->metaObject(); + + d->propertyGroups << QStringLiteral("QObject"); + d->groupProperties.insert(QStringLiteral("QObject"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("objectName")))); + + d->propertyGroups << QStringLiteral("QUmlElement"); + d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedComments")))); + d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("ownedElements")))); + d->groupProperties.insert(QStringLiteral("QUmlElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owner")))); + + d->propertyGroups << QStringLiteral("QUmlParameterableElement"); + d->groupProperties.insert(QStringLiteral("QUmlParameterableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("owningTemplateParameter")))); + d->groupProperties.insert(QStringLiteral("QUmlParameterableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("templateParameter")))); + + d->propertyGroups << QStringLiteral("QUmlNamedElement"); + d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("clientDependencies")))); + d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("name")))); + d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("nameExpression")))); + d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("namespace_")))); + d->groupProperties.insert(QStringLiteral("QUmlNamedElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("qualifiedName")))); + + d->propertyGroups << QStringLiteral("QUmlPackageableElement"); + d->groupProperties.insert(QStringLiteral("QUmlPackageableElement"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("visibility")))); + + d->propertyGroups << QStringLiteral("QUmlRelationship"); + d->groupProperties.insert(QStringLiteral("QUmlRelationship"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("relatedElements")))); + + d->propertyGroups << QStringLiteral("QUmlDirectedRelationship"); + d->groupProperties.insert(QStringLiteral("QUmlDirectedRelationship"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("sources")))); + d->groupProperties.insert(QStringLiteral("QUmlDirectedRelationship"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("targets")))); + + d->propertyGroups << QStringLiteral("QUmlDependency"); + d->groupProperties.insert(QStringLiteral("QUmlDependency"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("clients")))); + d->groupProperties.insert(QStringLiteral("QUmlDependency"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("suppliers")))); + + d->propertyGroups << QStringLiteral("QUmlAbstraction"); + d->groupProperties.insert(QStringLiteral("QUmlAbstraction"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("mapping")))); + + d->propertyGroups << QStringLiteral("QUmlRealization"); + + d->propertyGroups << QStringLiteral("QUmlSubstitution"); + d->groupProperties.insert(QStringLiteral("QUmlSubstitution"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("contract")))); + d->groupProperties.insert(QStringLiteral("QUmlSubstitution"), new QMetaProperty(metaObject->property(metaObject->indexOfProperty("substitutingClassifier")))); +} + +void QUmlSubstitutionObject::setPropertyData() +{ + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, AggregationRole, QStringLiteral("none")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, PropertyClassRole, QStringLiteral("QUmlSubstitution")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, IsDerivedRole, false); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, IsDerivedUnionRole, false); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, DocumentationRole, QStringLiteral("The contract with which the substituting classifier complies.")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, RedefinedPropertiesRole, QStringLiteral("")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, SubsettedPropertiesRole, QStringLiteral("Dependency-supplier")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, contract, OppositeEndRole, QStringLiteral("")); + + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, AggregationRole, QStringLiteral("none")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, PropertyClassRole, QStringLiteral("QUmlSubstitution")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, IsDerivedRole, false); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, IsDerivedUnionRole, false); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, DocumentationRole, QStringLiteral("Instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected.")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, RedefinedPropertiesRole, QStringLiteral("")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, SubsettedPropertiesRole, QStringLiteral("Element-owner Dependency-client")); + Q_DECLARE_METAPROPERTY_INFO(QUmlSubstitution, substitutingClassifier, OppositeEndRole, QStringLiteral("Classifier-substitution")); + } QT_END_NAMESPACE |