summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlcommunicationpath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlcommunicationpath.cpp')
-rw-r--r--src/uml/qumlcommunicationpath.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/uml/qumlcommunicationpath.cpp b/src/uml/qumlcommunicationpath.cpp
index 0cf45a98..22a7f050 100644
--- a/src/uml/qumlcommunicationpath.cpp
+++ b/src/uml/qumlcommunicationpath.cpp
@@ -91,6 +91,14 @@ QUmlCommunicationPath::QUmlCommunicationPath(bool createQModelingObject) :
}
/*!
+ Destroys the QUmlCommunicationPath.
+ */
+QUmlCommunicationPath::~QUmlCommunicationPath()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlCommunicationPath.
*/
QModelingElement *QUmlCommunicationPath::clone() const
@@ -98,8 +106,6 @@ QModelingElement *QUmlCommunicationPath::clone() const
QUmlCommunicationPath *c = new QUmlCommunicationPath;
foreach (QUmlComment *element, ownedComments())
c->addOwnedComment(dynamic_cast<QUmlComment *>(element->clone()));
- foreach (QUmlDependency *element, clientDependencies())
- c->addClientDependency(dynamic_cast<QUmlDependency *>(element->clone()));
c->setName(name());
if (nameExpression())
c->setNameExpression(dynamic_cast<QUmlStringExpression *>(nameExpression()->clone()));
@@ -109,11 +115,7 @@ QModelingElement *QUmlCommunicationPath::clone() const
c->addOwnedRule(dynamic_cast<QUmlConstraint *>(element->clone()));
foreach (QUmlPackageImport *element, packageImports())
c->addPackageImport(dynamic_cast<QUmlPackageImport *>(element->clone()));
- if (owningTemplateParameter())
- c->setOwningTemplateParameter(dynamic_cast<QUmlTemplateParameter *>(owningTemplateParameter()->clone()));
c->setVisibility(visibility());
- if (package())
- c->setPackage(dynamic_cast<QUmlPackage *>(package()->clone()));
c->setLeaf(isLeaf());
foreach (QUmlTemplateBinding *element, templateBindings())
c->addTemplateBinding(dynamic_cast<QUmlTemplateBinding *>(element->clone()));
@@ -127,23 +129,9 @@ QModelingElement *QUmlCommunicationPath::clone() const
c->setOwnedTemplateSignature(dynamic_cast<QUmlRedefinableTemplateSignature *>(ownedTemplateSignature()->clone()));
foreach (QUmlUseCase *element, ownedUseCases())
c->addOwnedUseCase(dynamic_cast<QUmlUseCase *>(element->clone()));
- foreach (QUmlGeneralizationSet *element, powertypeExtents())
- c->addPowertypeExtent(dynamic_cast<QUmlGeneralizationSet *>(element->clone()));
- foreach (QUmlClassifier *element, redefinedClassifiers())
- c->addRedefinedClassifier(dynamic_cast<QUmlClassifier *>(element->clone()));
- if (representation())
- c->setRepresentation(dynamic_cast<QUmlCollaborationUse *>(representation()->clone()));
foreach (QUmlSubstitution *element, substitutions())
c->addSubstitution(dynamic_cast<QUmlSubstitution *>(element->clone()));
- if (templateParameter())
- c->setTemplateParameter(dynamic_cast<QUmlClassifierTemplateParameter *>(templateParameter()->clone()));
- foreach (QUmlUseCase *element, useCases())
- c->addUseCase(dynamic_cast<QUmlUseCase *>(element->clone()));
c->setDerived(isDerived());
- foreach (QUmlProperty *element, memberEnds())
- c->addMemberEnd(dynamic_cast<QUmlProperty *>(element->clone()));
- foreach (QUmlProperty *element, navigableOwnedEnds())
- c->addNavigableOwnedEnd(dynamic_cast<QUmlProperty *>(element->clone()));
foreach (QUmlProperty *element, ownedEnds())
c->addOwnedEnd(dynamic_cast<QUmlProperty *>(element->clone()));
return c;