diff options
| author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-25 09:33:35 -0300 |
|---|---|---|
| committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-25 14:34:42 +0200 |
| commit | ea1a2ed03ac0880ef969e01598016de0581fbd41 (patch) | |
| tree | 57bc0b889a3fbb33f72019759940d945e72d4873 /src/uml/qumltimeconstraint.cpp | |
| parent | d1ee48c7b8f3032f4806522417a2bfdcc802bcc3 (diff) | |
Provide new UML metamodel implementation
- QtWrappedObject is going to be replaced by QtModeling
- DuSE-MT broken until refactoring finishes
Change-Id: I628704ea9dac715d672638a2a9fee2071055dd92
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/uml/qumltimeconstraint.cpp')
| -rw-r--r-- | src/uml/qumltimeconstraint.cpp | 90 |
1 files changed, 9 insertions, 81 deletions
diff --git a/src/uml/qumltimeconstraint.cpp b/src/uml/qumltimeconstraint.cpp index 93ba8faf..f10fdc03 100644 --- a/src/uml/qumltimeconstraint.cpp +++ b/src/uml/qumltimeconstraint.cpp @@ -43,8 +43,6 @@ #include <QtUml/QUmlTimeInterval> -#include <QtWrappedObjects/QtWrappedObjectsNamespace> - QT_BEGIN_NAMESPACE QUmlTimeConstraintPrivate::QUmlTimeConstraintPrivate() : @@ -53,10 +51,6 @@ QUmlTimeConstraintPrivate::QUmlTimeConstraintPrivate() : { } -QUmlTimeConstraintPrivate::~QUmlTimeConstraintPrivate() -{ -} - /*! \class QUmlTimeConstraint @@ -65,106 +59,40 @@ QUmlTimeConstraintPrivate::~QUmlTimeConstraintPrivate() \brief A time constraint is a constraint that refers to a time interval. */ -QUmlTimeConstraint::QUmlTimeConstraint(QWrappedObject *wrapper, QWrappedObject *parent) : - QUmlIntervalConstraint(*new QUmlTimeConstraintPrivate, wrapper, parent) +QUmlTimeConstraint::QUmlTimeConstraint(bool create_d_ptr) : + QUmlIntervalConstraint(false) { - setPropertyData(); + if (create_d_ptr) + set_d_ptr(new QUmlTimeConstraintPrivate); } -QUmlTimeConstraint::QUmlTimeConstraint(QUmlTimeConstraintPrivate &dd, QWrappedObject *wrapper, QWrappedObject *parent) : - QUmlIntervalConstraint(dd, wrapper, parent) -{ - setPropertyData(); -} - -QUmlTimeConstraint::~QUmlTimeConstraint() -{ -} - -// --------------------------------------------------------------- -// ATTRIBUTES FROM QUmlTimeConstraint -// --------------------------------------------------------------- +// Owned attributes /*! The value of firstEvent is related to constrainedElement. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters constrainedElement. If firstEvent is false, then the corresponding observation event is the last time instant the execution is within constrainedElement. */ bool QUmlTimeConstraint::firstEvent() const { - // This is a read-write attribute - - Q_D(const QUmlTimeConstraint); - return d->firstEvent; + return bool(); } void QUmlTimeConstraint::setFirstEvent(bool firstEvent) { - // This is a read-write attribute - - Q_D(QUmlTimeConstraint); - if (d->firstEvent != firstEvent) { - d->firstEvent = firstEvent; - } - d->modifiedResettableProperties << QString::fromLatin1("firstEvent"); + Q_UNUSED(firstEvent); } -void QUmlTimeConstraint::unsetFirstEvent() -{ - setFirstEvent(true); - Q_D(QUmlTimeConstraint); - d->modifiedResettableProperties.removeAll(QString::fromLatin1("firstEvent")); -} - -// --------------------------------------------------------------- -// ASSOCIATION ENDS FROM QUmlTimeConstraint -// --------------------------------------------------------------- - /*! A condition that must be true when evaluated in order for the constraint to be satisfied. */ QUmlTimeInterval *QUmlTimeConstraint::specification() const { - // This is a read-write association end - - Q_D(const QUmlTimeConstraint); - return d->specification; + return 0; } void QUmlTimeConstraint::setSpecification(QUmlTimeInterval *specification) { - // This is a read-write association end - - Q_D(QUmlTimeConstraint); - if (d->specification != specification) { - if (d->specification) - qTopLevelWrapper(d->specification)->setParent(0); - d->specification = specification; - qTopLevelWrapper(specification)->setParent(qTopLevelWrapper(this)); - - // Adjust redefined property(ies) - (qwrappedobject_cast<QUmlIntervalConstraint *>(this))->setSpecification(qwrappedobject_cast<QUmlInterval *>(specification)); - } -} - -void QUmlTimeConstraint::setPropertyData() -{ - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("firstEvent")][QtWrappedObjects::AggregationRole] = QString::fromLatin1("none"); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("firstEvent")][QtWrappedObjects::IsDerivedUnionRole] = false; - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("firstEvent")][QtWrappedObjects::DocumentationRole] = QString::fromLatin1("The value of firstEvent is related to constrainedElement. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters constrainedElement. If firstEvent is false, then the corresponding observation event is the last time instant the execution is within constrainedElement."); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("firstEvent")][QtWrappedObjects::RedefinedPropertiesRole] = QString::fromLatin1(""); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("firstEvent")][QtWrappedObjects::SubsettedPropertiesRole] = QString::fromLatin1(""); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("firstEvent")][QtWrappedObjects::OppositeEndRole] = QString::fromLatin1(""); - - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("specification")][QtWrappedObjects::AggregationRole] = QString::fromLatin1("composite"); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("specification")][QtWrappedObjects::IsDerivedUnionRole] = false; - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("specification")][QtWrappedObjects::DocumentationRole] = QString::fromLatin1("A condition that must be true when evaluated in order for the constraint to be satisfied."); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("specification")][QtWrappedObjects::RedefinedPropertiesRole] = QString::fromLatin1("QUmlIntervalConstraint::specification"); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("specification")][QtWrappedObjects::SubsettedPropertiesRole] = QString::fromLatin1(""); - QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlTimeConstraint")][QString::fromLatin1("specification")][QtWrappedObjects::OppositeEndRole] = QString::fromLatin1("QUml"); - - QUmlIntervalConstraint::setPropertyData(); + Q_UNUSED(specification); } QT_END_NAMESPACE -#include "moc_qumltimeconstraint.cpp" - |
