summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlparameterableelement.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-08-25 09:33:35 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-08-25 14:34:42 +0200
commitea1a2ed03ac0880ef969e01598016de0581fbd41 (patch)
tree57bc0b889a3fbb33f72019759940d945e72d4873 /src/uml/qumlparameterableelement.cpp
parentd1ee48c7b8f3032f4806522417a2bfdcc802bcc3 (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/qumlparameterableelement.cpp')
-rw-r--r--src/uml/qumlparameterableelement.cpp100
1 files changed, 16 insertions, 84 deletions
diff --git a/src/uml/qumlparameterableelement.cpp b/src/uml/qumlparameterableelement.cpp
index d341b1f3..8d3e2696 100644
--- a/src/uml/qumlparameterableelement.cpp
+++ b/src/uml/qumlparameterableelement.cpp
@@ -43,8 +43,6 @@
#include <QtUml/QUmlTemplateParameter>
-#include <QtWrappedObjects/QtWrappedObjectsNamespace>
-
QT_BEGIN_NAMESPACE
QUmlParameterableElementPrivate::QUmlParameterableElementPrivate() :
@@ -53,10 +51,6 @@ QUmlParameterableElementPrivate::QUmlParameterableElementPrivate() :
{
}
-QUmlParameterableElementPrivate::~QUmlParameterableElementPrivate()
-{
-}
-
/*!
\class QUmlParameterableElement
@@ -65,54 +59,28 @@ QUmlParameterableElementPrivate::~QUmlParameterableElementPrivate()
\brief A parameterable element is an element that can be exposed as a formal template parameter for a template, or specified as an actual parameter in a binding of a template.
*/
-QUmlParameterableElement::QUmlParameterableElement(QWrappedObject *wrapper, QWrappedObject *parent) :
- QUmlElement(*new QUmlParameterableElementPrivate, wrapper, parent)
-{
- setPropertyData();
-}
-
-QUmlParameterableElement::QUmlParameterableElement(QUmlParameterableElementPrivate &dd, QWrappedObject *wrapper, QWrappedObject *parent) :
- QUmlElement(dd, wrapper, parent)
-{
- setPropertyData();
-}
-
-QUmlParameterableElement::~QUmlParameterableElement()
+QUmlParameterableElement::QUmlParameterableElement(bool create_d_ptr) :
+ QUmlElement(false)
{
+ if (create_d_ptr) {
+ qDebug() << "QUmlParameterableElement::QUmlParameterableElement criando";
+ set_d_ptr(new QUmlParameterableElementPrivate);
+ }
}
-// ---------------------------------------------------------------
-// ASSOCIATION ENDS FROM QUmlParameterableElement
-// ---------------------------------------------------------------
+// Owned attributes
/*!
The formal template parameter that owns this element.
*/
QUmlTemplateParameter *QUmlParameterableElement::owningTemplateParameter() const
{
- // This is a read-write association end
-
- Q_D(const QUmlParameterableElement);
- return d->owningTemplateParameter;
+ return 0;
}
void QUmlParameterableElement::setOwningTemplateParameter(QUmlTemplateParameter *owningTemplateParameter)
{
- // This is a read-write association end
-
- Q_D(QUmlParameterableElement);
- if (d->owningTemplateParameter != owningTemplateParameter) {
- // Adjust opposite property
-
- d->owningTemplateParameter = owningTemplateParameter;
-
- // Adjust subsetted property(ies)
- (qwrappedobject_cast<QUmlParameterableElement *>(this))->setTemplateParameter(qwrappedobject_cast<QUmlTemplateParameter *>(owningTemplateParameter));
- (qwrappedobject_cast<QUmlElementPrivate *>(d))->setOwner(qwrappedobject_cast<QUmlElement *>(owningTemplateParameter));
-
- // Adjust opposite property
- owningTemplateParameter->setOwnedParameteredElement(this);
- }
+ Q_UNUSED(owningTemplateParameter);
}
/*!
@@ -120,36 +88,23 @@ void QUmlParameterableElement::setOwningTemplateParameter(QUmlTemplateParameter
*/
QUmlTemplateParameter *QUmlParameterableElement::templateParameter() const
{
- // This is a read-write association end
-
- Q_D(const QUmlParameterableElement);
- return d->templateParameter;
+ return 0;
}
void QUmlParameterableElement::setTemplateParameter(QUmlTemplateParameter *templateParameter)
{
- // This is a read-write association end
-
- Q_D(QUmlParameterableElement);
- if (d->templateParameter != templateParameter) {
- // Adjust opposite property
-
- d->templateParameter = templateParameter;
-
- // Adjust opposite property
- templateParameter->setParameteredElement(this);
- }
+ Q_UNUSED(templateParameter);
}
+// 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.
*/
-bool QUmlParameterableElement::isCompatibleWith(const QUmlParameterableElement *p) const
+bool QUmlParameterableElement::isCompatibleWith(QUmlParameterableElement *p) const
{
- qWarning("QUmlParameterableElement::isCompatibleWith: operation to be implemented");
Q_UNUSED(p);
-
- return bool(); // change here to your derived return
+ return bool ();
}
/*!
@@ -157,31 +112,8 @@ bool QUmlParameterableElement::isCompatibleWith(const QUmlParameterableElement *
*/
bool QUmlParameterableElement::isTemplateParameter() const
{
- qWarning("QUmlParameterableElement::isTemplateParameter: operation to be implemented");
-
- return bool(); // change here to your derived return
-}
-
-void QUmlParameterableElement::setPropertyData()
-{
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("owningTemplateParameter")][QtWrappedObjects::AggregationRole] = QString::fromLatin1("none");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("owningTemplateParameter")][QtWrappedObjects::IsDerivedUnionRole] = false;
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("owningTemplateParameter")][QtWrappedObjects::DocumentationRole] = QString::fromLatin1("The formal template parameter that owns this element.");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("owningTemplateParameter")][QtWrappedObjects::RedefinedPropertiesRole] = QString::fromLatin1("");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("owningTemplateParameter")][QtWrappedObjects::SubsettedPropertiesRole] = QString::fromLatin1("QUmlParameterableElement::templateParameter QUmlElement::owner");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("owningTemplateParameter")][QtWrappedObjects::OppositeEndRole] = QString::fromLatin1("QUmlTemplateParameter::ownedParameteredElement");
-
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("templateParameter")][QtWrappedObjects::AggregationRole] = QString::fromLatin1("none");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("templateParameter")][QtWrappedObjects::IsDerivedUnionRole] = false;
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("templateParameter")][QtWrappedObjects::DocumentationRole] = QString::fromLatin1("The template parameter that exposes this element as a formal parameter.");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("templateParameter")][QtWrappedObjects::RedefinedPropertiesRole] = QString::fromLatin1("");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("templateParameter")][QtWrappedObjects::SubsettedPropertiesRole] = QString::fromLatin1("");
- QWrappedObject::propertyDataHash[QString::fromLatin1("QUmlParameterableElement")][QString::fromLatin1("templateParameter")][QtWrappedObjects::OppositeEndRole] = QString::fromLatin1("QUmlTemplateParameter::parameteredElement");
-
- QUmlElement::setPropertyData();
+ return bool ();
}
QT_END_NAMESPACE
-#include "moc_qumlparameterableelement.cpp"
-