summaryrefslogtreecommitdiffstats
path: root/src/uml/qumldeploymentspecification.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumldeploymentspecification.cpp')
-rw-r--r--src/uml/qumldeploymentspecification.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/uml/qumldeploymentspecification.cpp b/src/uml/qumldeploymentspecification.cpp
index c9188596..ce5c2a74 100644
--- a/src/uml/qumldeploymentspecification.cpp
+++ b/src/uml/qumldeploymentspecification.cpp
@@ -95,6 +95,14 @@ QUmlDeploymentSpecification::QUmlDeploymentSpecification(bool createQModelingObj
}
/*!
+ Destroys the QUmlDeploymentSpecification.
+ */
+QUmlDeploymentSpecification::~QUmlDeploymentSpecification()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlDeploymentSpecification.
*/
QModelingElement *QUmlDeploymentSpecification::clone() const
@@ -102,8 +110,6 @@ QModelingElement *QUmlDeploymentSpecification::clone() const
QUmlDeploymentSpecification *c = new QUmlDeploymentSpecification;
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()));
@@ -113,11 +119,7 @@ QModelingElement *QUmlDeploymentSpecification::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()));
@@ -131,18 +133,8 @@ QModelingElement *QUmlDeploymentSpecification::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->setFileName(fileName());
foreach (QUmlManifestation *element, manifestations())
c->addManifestation(dynamic_cast<QUmlManifestation *>(element->clone()));
@@ -152,8 +144,6 @@ QModelingElement *QUmlDeploymentSpecification::clone() const
c->addOwnedAttribute(dynamic_cast<QUmlProperty *>(element->clone()));
foreach (QUmlOperation *element, ownedOperations())
c->addOwnedOperation(dynamic_cast<QUmlOperation *>(element->clone()));
- if (deployment())
- c->setDeployment(dynamic_cast<QUmlDeployment *>(deployment()->clone()));
c->setDeploymentLocation(deploymentLocation());
c->setExecutionLocation(executionLocation());
return c;