summaryrefslogtreecommitdiffstats
path: root/src/uml/qumltimeconstraint.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-08-25 16:07:06 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-08-25 21:06:07 +0200
commit1c770ad764a39ce0ad40913c1c4bd72bd43710a9 (patch)
treee6f7789ee1b007e081c7f45e385135b6e8e37bd2 /src/uml/qumltimeconstraint.cpp
parentea1a2ed03ac0880ef969e01598016de0581fbd41 (diff)
Add handling of derived properties in artifact generation from xmi
Change-Id: I3764f41fd6a727f1a09daed9fc82c9fedf8ba5af Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/uml/qumltimeconstraint.cpp')
-rw-r--r--src/uml/qumltimeconstraint.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/uml/qumltimeconstraint.cpp b/src/uml/qumltimeconstraint.cpp
index f10fdc03..653f6a49 100644
--- a/src/uml/qumltimeconstraint.cpp
+++ b/src/uml/qumltimeconstraint.cpp
@@ -66,19 +66,27 @@ QUmlTimeConstraint::QUmlTimeConstraint(bool create_d_ptr) :
set_d_ptr(new QUmlTimeConstraintPrivate);
}
-// Owned attributes
+// 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
{
- return bool();
+ // This is a read-write property
+
+ QM_D(const QUmlTimeConstraint);
+ return d->firstEvent;
}
void QUmlTimeConstraint::setFirstEvent(bool firstEvent)
{
- Q_UNUSED(firstEvent);
+ // This is a read-write property
+
+ QM_D(QUmlTimeConstraint);
+ if (d->firstEvent != firstEvent) {
+ d->firstEvent = firstEvent;
+ }
}
/*!
@@ -86,12 +94,20 @@ void QUmlTimeConstraint::setFirstEvent(bool firstEvent)
*/
QUmlTimeInterval *QUmlTimeConstraint::specification() const
{
- return 0;
+ // This is a read-write association end
+
+ QM_D(const QUmlTimeConstraint);
+ return d->specification;
}
void QUmlTimeConstraint::setSpecification(QUmlTimeInterval *specification)
{
- Q_UNUSED(specification);
+ // This is a read-write association end
+
+ QM_D(QUmlTimeConstraint);
+ if (d->specification != specification) {
+ d->specification = specification;
+ }
}
QT_END_NAMESPACE