summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlreduceaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlreduceaction.cpp')
-rw-r--r--src/uml/qumlreduceaction.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/uml/qumlreduceaction.cpp b/src/uml/qumlreduceaction.cpp
index 0f037794..ee98cd8c 100644
--- a/src/uml/qumlreduceaction.cpp
+++ b/src/uml/qumlreduceaction.cpp
@@ -88,6 +88,14 @@ QUmlReduceAction::QUmlReduceAction(bool createQModelingObject) :
}
/*!
+ Destroys the QUmlReduceAction.
+ */
+QUmlReduceAction::~QUmlReduceAction()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlReduceAction.
*/
QModelingElement *QUmlReduceAction::clone() const
@@ -95,27 +103,11 @@ QModelingElement *QUmlReduceAction::clone() const
QUmlReduceAction *c = new QUmlReduceAction;
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()));
c->setVisibility(visibility());
c->setLeaf(isLeaf());
- if (activity())
- c->setActivity(dynamic_cast<QUmlActivity *>(activity()->clone()));
- foreach (QUmlInterruptibleActivityRegion *element, inInterruptibleRegions())
- c->addInInterruptibleRegion(dynamic_cast<QUmlInterruptibleActivityRegion *>(element->clone()));
- foreach (QUmlActivityPartition *element, inPartitions())
- c->addInPartition(dynamic_cast<QUmlActivityPartition *>(element->clone()));
- if (inStructuredNode())
- c->setInStructuredNode(dynamic_cast<QUmlStructuredActivityNode *>(inStructuredNode()->clone()));
- foreach (QUmlActivityEdge *element, incomings())
- c->addIncoming(dynamic_cast<QUmlActivityEdge *>(element->clone()));
- foreach (QUmlActivityEdge *element, outgoings())
- c->addOutgoing(dynamic_cast<QUmlActivityEdge *>(element->clone()));
- foreach (QUmlActivityNode *element, redefinedNodes())
- c->addRedefinedNode(dynamic_cast<QUmlActivityNode *>(element->clone()));
foreach (QUmlExceptionHandler *element, handlers())
c->addHandler(dynamic_cast<QUmlExceptionHandler *>(element->clone()));
c->setLocallyReentrant(isLocallyReentrant());
@@ -126,8 +118,6 @@ QModelingElement *QUmlReduceAction::clone() const
if (collection())
c->setCollection(dynamic_cast<QUmlInputPin *>(collection()->clone()));
c->setOrdered(isOrdered());
- if (reducer())
- c->setReducer(dynamic_cast<QUmlBehavior *>(reducer()->clone()));
if (result())
c->setResult(dynamic_cast<QUmlOutputPin *>(result()->clone()));
return c;