summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlparameterableelement.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/qumlparameterableelement.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/qumlparameterableelement.cpp')
-rw-r--r--src/uml/qumlparameterableelement.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/uml/qumlparameterableelement.cpp b/src/uml/qumlparameterableelement.cpp
index 8d3e2696..22d39e80 100644
--- a/src/uml/qumlparameterableelement.cpp
+++ b/src/uml/qumlparameterableelement.cpp
@@ -62,25 +62,31 @@ QUmlParameterableElementPrivate::QUmlParameterableElementPrivate() :
QUmlParameterableElement::QUmlParameterableElement(bool create_d_ptr) :
QUmlElement(false)
{
- if (create_d_ptr) {
- qDebug() << "QUmlParameterableElement::QUmlParameterableElement criando";
+ if (create_d_ptr)
set_d_ptr(new QUmlParameterableElementPrivate);
- }
}
-// Owned attributes
+// OWNED ATTRIBUTES
/*!
The formal template parameter that owns this element.
*/
QUmlTemplateParameter *QUmlParameterableElement::owningTemplateParameter() const
{
- return 0;
+ // This is a read-write association end
+
+ QM_D(const QUmlParameterableElement);
+ return d->owningTemplateParameter;
}
void QUmlParameterableElement::setOwningTemplateParameter(QUmlTemplateParameter *owningTemplateParameter)
{
- Q_UNUSED(owningTemplateParameter);
+ // This is a read-write association end
+
+ QM_D(QUmlParameterableElement);
+ if (d->owningTemplateParameter != owningTemplateParameter) {
+ d->owningTemplateParameter = owningTemplateParameter;
+ }
}
/*!
@@ -88,15 +94,23 @@ void QUmlParameterableElement::setOwningTemplateParameter(QUmlTemplateParameter
*/
QUmlTemplateParameter *QUmlParameterableElement::templateParameter() const
{
- return 0;
+ // This is a read-write association end
+
+ QM_D(const QUmlParameterableElement);
+ return d->templateParameter;
}
void QUmlParameterableElement::setTemplateParameter(QUmlTemplateParameter *templateParameter)
{
- Q_UNUSED(templateParameter);
+ // This is a read-write association end
+
+ QM_D(QUmlParameterableElement);
+ if (d->templateParameter != templateParameter) {
+ d->templateParameter = templateParameter;
+ }
}
-// Operations
+// OPERATIONS
/*!
The query isCompatibleWith() determines if this parameterable element is compatible with the specified parameterable element. By default parameterable element P is compatible with parameterable element Q if the kind of P is the same or a subtype as the kind of Q. Subclasses should override this operation to specify different compatibility constraints.