[Uml-devel] branches/KDE/3.5/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Feb 20 21:17:42 UTC 2007
SVN commit 635772 by okellogg:
findObjectsRelated(): Only consider those associations for which `c' is in
role A. Only add the role B object to the returned list.
BUG:141956
M +2 -0 ChangeLog
M +4 -10 umbrello/codegenerator.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #635771:635772
@@ -15,6 +15,8 @@
* Unable to delete multiplicity information or lable from an association
(141813)
* C++ code generator does not correctly define namespaces (141876)
+* Ada code generator generates "withs" in both directions for certain
+ associations (141956)
Version 1.5.61
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerator.cpp #635771:635772
@@ -548,7 +548,6 @@
void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList) {
UMLPackage *temp;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLAssociationList associations = c->getAssociations();
for (UMLAssociation *a = associations.first(); a; a = associations.next()) {
@@ -568,10 +567,8 @@
{
UMLObject *objA = a->getObject(Uml::A);
UMLObject *objB = a->getObject(Uml::B);
- if (objA != c)
- temp = (UMLPackage*)objA;
- else if (objB != c)
- temp = (UMLPackage*)objB;
+ if (objA == c)
+ temp = static_cast<UMLPackage*>(objB);
}
break;
case Uml::at_Aggregation:
@@ -582,12 +579,9 @@
UMLObject *objA = a->getObject(Uml::A);
UMLObject *objB = a->getObject(Uml::B);
// Add related object only if the rolename is not empty.
- if (objA != c && !a->getRoleName(Uml::A).isEmpty() &&
- objA->getBaseType() != Uml::ot_Datatype)
- temp = (UMLPackage*)objA;
- else if (objB != c && !a->getRoleName(Uml::B).isEmpty() &&
+ if (objA == c && !a->getRoleName(Uml::B).isEmpty() &&
objB->getBaseType() != Uml::ot_Datatype)
- temp = (UMLPackage*)objB;
+ temp = static_cast<UMLPackage*>(objB);
}
break;
default: /* all others.. like for state diagrams..we currently don't use */
More information about the umbrello-devel
mailing list