summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlartifact.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-08-26 01:50:38 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-08-26 06:49:24 +0200
commite19731ec2dc5dd478180e54bc47e1ecb163bb208 (patch)
tree808e3f4491a3460a73b72348721c9fd6a2b82fb7 /src/uml/qumlartifact.cpp
parentb15e532fc664d4c5d91095bb22093a68e3bdfd39 (diff)
Add support for opposite properties handling
Change-Id: Ic0706bac72eeed36cabb07b54b778190f34736b7 Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/uml/qumlartifact.cpp')
-rw-r--r--src/uml/qumlartifact.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/uml/qumlartifact.cpp b/src/uml/qumlartifact.cpp
index aeedef3a..7e2e8384 100644
--- a/src/uml/qumlartifact.cpp
+++ b/src/uml/qumlartifact.cpp
@@ -95,6 +95,10 @@ void QUmlArtifact::addManifestation(QUmlManifestation *manifestation)
if (!_manifestation.contains(manifestation)) {
_manifestation.insert(manifestation);
+
+ // Adjust subsetted properties
+ addOwnedElement(manifestation);
+ addClientDependency(manifestation);
}
}
@@ -104,6 +108,10 @@ void QUmlArtifact::removeManifestation(QUmlManifestation *manifestation)
if (_manifestation.contains(manifestation)) {
_manifestation.remove(manifestation);
+
+ // Adjust subsetted properties
+ removeOwnedElement(manifestation);
+ removeClientDependency(manifestation);
}
}
@@ -123,6 +131,9 @@ void QUmlArtifact::addNestedArtifact(QUmlArtifact *nestedArtifact)
if (!_nestedArtifact.contains(nestedArtifact)) {
_nestedArtifact.insert(nestedArtifact);
+
+ // Adjust subsetted properties
+ addOwnedMember(nestedArtifact);
}
}
@@ -132,6 +143,9 @@ void QUmlArtifact::removeNestedArtifact(QUmlArtifact *nestedArtifact)
if (_nestedArtifact.contains(nestedArtifact)) {
_nestedArtifact.remove(nestedArtifact);
+
+ // Adjust subsetted properties
+ removeOwnedMember(nestedArtifact);
}
}
@@ -151,6 +165,10 @@ void QUmlArtifact::addOwnedAttribute(QUmlProperty *ownedAttribute)
if (!_ownedAttribute.contains(ownedAttribute)) {
_ownedAttribute.append(ownedAttribute);
+
+ // Adjust subsetted properties
+ addOwnedMember(ownedAttribute);
+ addAttribute(ownedAttribute);
}
}
@@ -160,6 +178,10 @@ void QUmlArtifact::removeOwnedAttribute(QUmlProperty *ownedAttribute)
if (_ownedAttribute.contains(ownedAttribute)) {
_ownedAttribute.removeAll(ownedAttribute);
+
+ // Adjust subsetted properties
+ removeOwnedMember(ownedAttribute);
+ removeAttribute(ownedAttribute);
}
}
@@ -179,6 +201,10 @@ void QUmlArtifact::addOwnedOperation(QUmlOperation *ownedOperation)
if (!_ownedOperation.contains(ownedOperation)) {
_ownedOperation.append(ownedOperation);
+
+ // Adjust subsetted properties
+ addFeature(ownedOperation);
+ addOwnedMember(ownedOperation);
}
}
@@ -188,6 +214,10 @@ void QUmlArtifact::removeOwnedOperation(QUmlOperation *ownedOperation)
if (_ownedOperation.contains(ownedOperation)) {
_ownedOperation.removeAll(ownedOperation);
+
+ // Adjust subsetted properties
+ removeFeature(ownedOperation);
+ removeOwnedMember(ownedOperation);
}
}